瀏覽代碼

ENH: Allow project to overwrite CMAKE_SYSTEM_NAME part of default BUILDNAME

Andy Cedilnik 21 年之前
父節點
當前提交
1ed700d91f
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. 4 2
      Modules/Dart.cmake

+ 4 - 2
Modules/Dart.cmake

@@ -98,7 +98,9 @@ IF(BUILD_TESTING)
     ELSE(WIN32)
       SET(DART_NAME_COMPONENT "NAME")
     ENDIF(WIN32)
-    SET(BUILD_NAME_SYSTEM_NAME "${CMAKE_SYSTEM_NAME}")
+    IF(NOT BUILD_NAME_SYSTEM_NAME)
+      SET(BUILD_NAME_SYSTEM_NAME "${CMAKE_SYSTEM_NAME}")
+    ENDIF(NOT BUILD_NAME_SYSTEM_NAME)
     IF(WIN32)
       SET(BUILD_NAME_SYSTEM_NAME "Win32")
     ENDIF(WIN32)
@@ -117,7 +119,7 @@ IF(BUILD_TESTING)
         SET(DART_CXX_NAME "vs71")
       ENDIF(CMAKE_GENERATOR MATCHES "^Visual Studio 7$")
     ENDIF(DART_CXX_NAME MATCHES "devenv")
-    SET(BUILDNAME "${CMAKE_SYSTEM_NAME}-${DART_CXX_NAME}")
+    SET(BUILDNAME "${BUILD_NAME_SYSTEM_NAME}-${DART_CXX_NAME}")
     MESSAGE(STATUS "Using Buildname: ${BUILDNAME}")
   ENDIF(NOT BUILDNAME)
   # set the build command