BUG: When configuring compiler information files into the CMakeFiles directory in the project build tree, use IMMEDIATE option for CONFIGURE_FILE explicitly. It is needed in case the user sets CMAKE_BACKWARDS_COMPATIBILITY to 2.0 or lower.

This commit is contained in:
Brad King 2008-02-04 10:04:23 -05:00
parent e67dc68a3b
commit c12a7e388d
5 changed files with 10 additions and 7 deletions

View File

@ -132,7 +132,8 @@ INCLUDE(CMakeFindBinUtils)
# configure variables set in this file for fast reload later on # configure variables set in this file for fast reload later on
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeCCompiler.cmake.in CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeCCompiler.cmake.in
"${CMAKE_PLATFORM_ROOT_BIN}/CMakeCCompiler.cmake" "${CMAKE_PLATFORM_ROOT_BIN}/CMakeCCompiler.cmake"
@ONLY) @ONLY IMMEDIATE # IMMEDIATE must be here for compatibility mode <= 2.0
)
SET(CMAKE_C_COMPILER_ENV_VAR "CC") SET(CMAKE_C_COMPILER_ENV_VAR "CC")

View File

@ -142,7 +142,8 @@ INCLUDE(CMakeFindBinUtils)
# configure all variables set in this file # configure all variables set in this file
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeCXXCompiler.cmake.in CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeCXXCompiler.cmake.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCXXCompiler.cmake ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCXXCompiler.cmake
@ONLY) @ONLY IMMEDIATE # IMMEDIATE must be here for compatibility mode <= 2.0
)
SET(CMAKE_CXX_COMPILER_ENV_VAR "CXX") SET(CMAKE_CXX_COMPILER_ENV_VAR "CXX")

View File

@ -136,5 +136,6 @@ INCLUDE(CMakeFindBinUtils)
# configure variables set in this file for fast reload later on # configure variables set in this file for fast reload later on
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeFortranCompiler.cmake.in CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeFortranCompiler.cmake.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeFortranCompiler.cmake ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeFortranCompiler.cmake
@ONLY) @ONLY IMMEDIATE # IMMEDIATE must be here for compatibility mode <= 2.0
)
SET(CMAKE_Fortran_COMPILER_ENV_VAR "FC") SET(CMAKE_Fortran_COMPILER_ENV_VAR "FC")

View File

@ -52,7 +52,7 @@ ELSE(NOT CMAKE_C_COMPILER_WORKS)
CONFIGURE_FILE( CONFIGURE_FILE(
${CMAKE_ROOT}/Modules/CMakeCCompiler.cmake.in ${CMAKE_ROOT}/Modules/CMakeCCompiler.cmake.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCCompiler.cmake ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCCompiler.cmake
@ONLY @ONLY IMMEDIATE # IMMEDIATE must be here for compatibility mode <= 2.0
) )
ENDIF(CMAKE_C_COMPILER_FORCED) ENDIF(CMAKE_C_COMPILER_FORCED)
ENDIF(NOT CMAKE_C_COMPILER_WORKS) ENDIF(NOT CMAKE_C_COMPILER_WORKS)

View File

@ -45,7 +45,7 @@ ELSE(NOT CMAKE_CXX_COMPILER_WORKS)
CONFIGURE_FILE( CONFIGURE_FILE(
${CMAKE_ROOT}/Modules/CMakeCXXCompiler.cmake.in ${CMAKE_ROOT}/Modules/CMakeCXXCompiler.cmake.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCXXCompiler.cmake ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCXXCompiler.cmake
@ONLY @ONLY IMMEDIATE # IMMEDIATE must be here for compatibility mode <= 2.0
) )
ENDIF(CMAKE_CXX_COMPILER_FORCED) ENDIF(CMAKE_CXX_COMPILER_FORCED)
ENDIF(NOT CMAKE_CXX_COMPILER_WORKS) ENDIF(NOT CMAKE_CXX_COMPILER_WORKS)