diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2006-03-02 12:52:52 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2006-03-02 12:52:52 (GMT) |
commit | 2f78d874a75e8032b90997df3449040c941b1b5b (patch) | |
tree | 5408031de6c0e838e0de29ee010364a84f4010a3 /Modules | |
parent | f2922860c64d056a5d1cdb9ca350df738e52a029 (diff) | |
download | CMake-2f78d874a75e8032b90997df3449040c941b1b5b.zip CMake-2f78d874a75e8032b90997df3449040c941b1b5b.tar.gz CMake-2f78d874a75e8032b90997df3449040c941b1b5b.tar.bz2 |
ENH: fix for bug 2921, move _OVERRIDE variable to a better position to allow changing _INIT variables
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeCInformation.cmake | 15 | ||||
-rw-r--r-- | Modules/CMakeCXXInformation.cmake | 15 | ||||
-rw-r--r-- | Modules/CMakeFortranInformation.cmake | 15 | ||||
-rw-r--r-- | Modules/CMakeJavaInformation.cmake | 13 |
4 files changed, 57 insertions, 1 deletions
diff --git a/Modules/CMakeCInformation.cmake b/Modules/CMakeCInformation.cmake index 7e953a6..6f9e995 100644 --- a/Modules/CMakeCInformation.cmake +++ b/Modules/CMakeCInformation.cmake @@ -11,6 +11,21 @@ SET(CMAKE_SYSTEM_AND_C_COMPILER_INFO_FILE ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake) INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL) +# This should be included before the _INIT variables are +# used to initialize the cache. Since the rule variables +# have if blocks on them, users can still define them here. +# But, it should still be after the platform file so changes can +# be made to those values. + +IF(CMAKE_USER_MAKE_RULES_OVERRIDE) + INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE}) +ENDIF(CMAKE_USER_MAKE_RULES_OVERRIDE) + +IF(CMAKE_USER_MAKE_RULES_OVERRIDE_C) + INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE_C}) +ENDIF(CMAKE_USER_MAKE_RULES_OVERRIDE_C) + + # for most systems a module is the same as a shared library # so unless the variable CMAKE_MODULE_EXISTS is set just # copy the values from the LIBRARY variables diff --git a/Modules/CMakeCXXInformation.cmake b/Modules/CMakeCXXInformation.cmake index 390904a..60a30f8 100644 --- a/Modules/CMakeCXXInformation.cmake +++ b/Modules/CMakeCXXInformation.cmake @@ -3,7 +3,6 @@ # It also loads the available platform file for the system-compiler # if it exists. - GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_CXX_COMPILER} NAME_WE) # since the gnu compiler has several names force g++ IF(CMAKE_COMPILER_IS_GNUCXX) @@ -12,6 +11,20 @@ ENDIF(CMAKE_COMPILER_IS_GNUCXX) SET(CMAKE_SYSTEM_AND_CXX_COMPILER_INFO_FILE ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake) INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL) +# This should be included before the _INIT variables are +# used to initialize the cache. Since the rule variables +# have if blocks on them, users can still define them here. +# But, it should still be after the platform file so changes can +# be made to those values. + +IF(CMAKE_USER_MAKE_RULES_OVERRIDE) + INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE}) +ENDIF(CMAKE_USER_MAKE_RULES_OVERRIDE) + +IF(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX) + INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE_CXX}) +ENDIF(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX) + # for most systems a module is the same as a shared library # so unless the variable CMAKE_MODULE_EXISTS is set just diff --git a/Modules/CMakeFortranInformation.cmake b/Modules/CMakeFortranInformation.cmake index 9d076b3..b340019 100644 --- a/Modules/CMakeFortranInformation.cmake +++ b/Modules/CMakeFortranInformation.cmake @@ -12,6 +12,21 @@ SET(CMAKE_SYSTEM_AND_Fortran_COMPILER_INFO_FILE ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake) INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL) +# This should be included before the _INIT variables are +# used to initialize the cache. Since the rule variables +# have if blocks on them, users can still define them here. +# But, it should still be after the platform file so changes can +# be made to those values. + +IF(CMAKE_USER_MAKE_RULES_OVERRIDE) + INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE}) +ENDIF(CMAKE_USER_MAKE_RULES_OVERRIDE) + +IF(CMAKE_USER_MAKE_RULES_OVERRIDE_Fortran) + INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE_Fortran}) +ENDIF(CMAKE_USER_MAKE_RULES_OVERRIDE_Fortran) + + # Fortran needs cmake to do a requires step during its build process to # catch any modules SET(CMAKE_NEEDS_REQUIRES_STEP_Fortran_FLAG 1) diff --git a/Modules/CMakeJavaInformation.cmake b/Modules/CMakeJavaInformation.cmake index 65c833e..d7692bc 100644 --- a/Modules/CMakeJavaInformation.cmake +++ b/Modules/CMakeJavaInformation.cmake @@ -1,3 +1,16 @@ +# This should be included before the _INIT variables are +# used to initialize the cache. Since the rule variables +# have if blocks on them, users can still define them here. +# But, it should still be after the platform file so changes can +# be made to those values. + +IF(CMAKE_USER_MAKE_RULES_OVERRIDE) + INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE}) +ENDIF(CMAKE_USER_MAKE_RULES_OVERRIDE) + +IF(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX) + INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE_CXX}) +ENDIF(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX) # this is a place holder if java needed flags for javac they would go here. IF(NOT CMAKE_Java_CREATE_STATIC_LIBRARY) |