Commit c12a7e38 authored by Brad King's avatar Brad King
Browse files

BUG: When configuring compiler information files into the CMakeFiles directory...

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.
parent e67dc68a
......@@ -132,7 +132,8 @@ INCLUDE(CMakeFindBinUtils)
# configure variables set in this file for fast reload later on
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeCCompiler.cmake.in
"${CMAKE_PLATFORM_ROOT_BIN}/CMakeCCompiler.cmake"
@ONLY)
"${CMAKE_PLATFORM_ROOT_BIN}/CMakeCCompiler.cmake"
@ONLY IMMEDIATE # IMMEDIATE must be here for compatibility mode <= 2.0
)
SET(CMAKE_C_COMPILER_ENV_VAR "CC")
......@@ -142,7 +142,8 @@ INCLUDE(CMakeFindBinUtils)
# configure all variables set in this file
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeCXXCompiler.cmake.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCXXCompiler.cmake
@ONLY)
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCXXCompiler.cmake
@ONLY IMMEDIATE # IMMEDIATE must be here for compatibility mode <= 2.0
)
SET(CMAKE_CXX_COMPILER_ENV_VAR "CXX")
......@@ -136,5 +136,6 @@ INCLUDE(CMakeFindBinUtils)
# configure variables set in this file for fast reload later on
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeFortranCompiler.cmake.in
${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")
......@@ -52,7 +52,7 @@ ELSE(NOT CMAKE_C_COMPILER_WORKS)
CONFIGURE_FILE(
${CMAKE_ROOT}/Modules/CMakeCCompiler.cmake.in
${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(NOT CMAKE_C_COMPILER_WORKS)
......
......@@ -45,7 +45,7 @@ ELSE(NOT CMAKE_CXX_COMPILER_WORKS)
CONFIGURE_FILE(
${CMAKE_ROOT}/Modules/CMakeCXXCompiler.cmake.in
${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(NOT CMAKE_CXX_COMPILER_WORKS)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment