mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 18:03:56 -04:00
add get_compiler(), get_build_date()
This commit is contained in:
parent
1e0716a20b
commit
f0e16bfb8f
@ -131,6 +131,41 @@ string PandaSystem::
|
||||
get_distributor() {
|
||||
return PANDA_DISTRIBUTOR;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: PandaSystem::get_compiler
|
||||
// Access: Published, Static
|
||||
// Description: Returns a string representing the compiler that was
|
||||
// used to generate this version of Panda, if it is
|
||||
// available, or "unknown" if it is not.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
string PandaSystem::
|
||||
get_compiler() {
|
||||
#ifdef COMPILER
|
||||
// MSVC defines this macro.
|
||||
return COMPILER;
|
||||
|
||||
#elif defined(__GNUC__)
|
||||
// GCC defines this one.
|
||||
return "GCC " __VERSION__;
|
||||
|
||||
#else
|
||||
// For other compilers, you're on your own.
|
||||
return "unknown";
|
||||
#endif
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: PandaSystem::get_build_date
|
||||
// Access: Published, Static
|
||||
// Description: Returns a string representing the date and time at
|
||||
// which this version of Panda (or at least dtool) was
|
||||
// compiled, if available.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
string PandaSystem::
|
||||
get_build_date() {
|
||||
return __DATE__ " " __TIME__;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: PandaSystem::has_system
|
||||
|
@ -43,6 +43,8 @@ PUBLISHED:
|
||||
static bool is_official_version();
|
||||
|
||||
static string get_distributor();
|
||||
static string get_compiler();
|
||||
static string get_build_date();
|
||||
|
||||
bool has_system(const string &system) const;
|
||||
int get_num_systems() const;
|
||||
|
Loading…
x
Reference in New Issue
Block a user