Browse Source

ENH: Added functions to get information about the CMake executable on each platform.

Brad King 24 năm trước cách đây
mục cha
commit
9312a7706b
2 tập tin đã thay đổi với 32 bổ sung0 xóa
  1. 21 0
      Source/cmSystemTools.cxx
  2. 11 0
      Source/cmSystemTools.h

+ 21 - 0
Source/cmSystemTools.cxx

@@ -487,3 +487,24 @@ void cmSystemTools::RemoveFile(const char* source)
   unlink(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  
+}
+
+
+

+ 11 - 0
Source/cmSystemTools.h

@@ -123,6 +123,17 @@ public:
   
   
   static long int ModifiedTime(const char* filename);
   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:
 private:
   static bool s_ErrorOccured;
   static bool s_ErrorOccured;