From 9312a7706b23f85a4230ada5a4f41457c4b4bd32 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 19 Mar 2001 10:09:04 -0500 Subject: ENH: Added functions to get information about the CMake executable on each platform. --- Source/cmSystemTools.cxx | 21 +++++++++++++++++++++ Source/cmSystemTools.h | 11 +++++++++++ 2 files changed, 32 insertions(+) diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index ca1cc5d..d5de675 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -487,3 +487,24 @@ void cmSystemTools::RemoveFile(const char* source) unlink(source); } + +const char* cmSystemTools::GetCMakeExecutableName() +{ +#if defined(_WIN32) && !defined(__CYGWIN__) + return "CMakeSetupCMD"; +#else + return "CMakeBuildTargets"; +#endif +} + +const char* cmSystemTools::GetCMakeExecutableOptions() +{ +#if defined(_WIN32) && !defined(__CYGWIN__) + return "-DSP"; +#else + return ""; +#endif +} + + + diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h index fbc8c68..a0432c0 100644 --- a/Source/cmSystemTools.h +++ b/Source/cmSystemTools.h @@ -123,6 +123,17 @@ public: static long int ModifiedTime(const char* filename); + /** + * Get the CMake executable name on the current platform. This will + * be "CMakeBuildTargets" for unix, and "CMakeSetupCMD" for windows. + */ + static const char* GetCMakeExecutableName(); + + /** + * Get the CMake executable options for the current platform. This will + * be "" for unix, and "-DSP" for windows. + */ + static const char* GetCMakeExecutableOptions(); private: static bool s_ErrorOccured; -- cgit v0.12