ENH: fix for bug 2921, move _OVERRIDE variable to a better position to allow changing _INIT variables
This commit is contained in:
parent
f2922860c6
commit
2f78d874a7
@ -11,6 +11,21 @@ SET(CMAKE_SYSTEM_AND_C_COMPILER_INFO_FILE
|
|||||||
${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
|
${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
|
||||||
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL)
|
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
|
# for most systems a module is the same as a shared library
|
||||||
# so unless the variable CMAKE_MODULE_EXISTS is set just
|
# so unless the variable CMAKE_MODULE_EXISTS is set just
|
||||||
# copy the values from the LIBRARY variables
|
# copy the values from the LIBRARY variables
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
# It also loads the available platform file for the system-compiler
|
# It also loads the available platform file for the system-compiler
|
||||||
# if it exists.
|
# if it exists.
|
||||||
|
|
||||||
|
|
||||||
GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_CXX_COMPILER} NAME_WE)
|
GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_CXX_COMPILER} NAME_WE)
|
||||||
# since the gnu compiler has several names force g++
|
# since the gnu compiler has several names force g++
|
||||||
IF(CMAKE_COMPILER_IS_GNUCXX)
|
IF(CMAKE_COMPILER_IS_GNUCXX)
|
||||||
@ -12,6 +11,20 @@ ENDIF(CMAKE_COMPILER_IS_GNUCXX)
|
|||||||
SET(CMAKE_SYSTEM_AND_CXX_COMPILER_INFO_FILE
|
SET(CMAKE_SYSTEM_AND_CXX_COMPILER_INFO_FILE
|
||||||
${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
|
${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
|
||||||
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL)
|
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
|
# for most systems a module is the same as a shared library
|
||||||
# so unless the variable CMAKE_MODULE_EXISTS is set just
|
# so unless the variable CMAKE_MODULE_EXISTS is set just
|
||||||
|
@ -12,6 +12,21 @@ SET(CMAKE_SYSTEM_AND_Fortran_COMPILER_INFO_FILE
|
|||||||
${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
|
${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
|
||||||
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL)
|
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
|
# Fortran needs cmake to do a requires step during its build process to
|
||||||
# catch any modules
|
# catch any modules
|
||||||
SET(CMAKE_NEEDS_REQUIRES_STEP_Fortran_FLAG 1)
|
SET(CMAKE_NEEDS_REQUIRES_STEP_Fortran_FLAG 1)
|
||||||
|
@ -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.
|
# this is a place holder if java needed flags for javac they would go here.
|
||||||
IF(NOT CMAKE_Java_CREATE_STATIC_LIBRARY)
|
IF(NOT CMAKE_Java_CREATE_STATIC_LIBRARY)
|
||||||
|
@ -430,13 +430,6 @@ cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages,
|
|||||||
{
|
{
|
||||||
mf->ReadListFile(0,projectCompatibility.c_str());
|
mf->ReadListFile(0,projectCompatibility.c_str());
|
||||||
}
|
}
|
||||||
// next load the file pointed to by CMAKE_USER_MAKE_RULES_OVERRIDE
|
|
||||||
std::string userMakeRules =
|
|
||||||
mf->GetSafeDefinition("CMAKE_USER_MAKE_RULES_OVERRIDE");
|
|
||||||
if(userMakeRules.size())
|
|
||||||
{
|
|
||||||
mf->ReadListFile(0,userMakeRules.c_str());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* cmGlobalGenerator::GetLanguageOutputExtensionForLanguage(const char* lang)
|
const char* cmGlobalGenerator::GetLanguageOutputExtensionForLanguage(const char* lang)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user