diff options
author | Brad King <brad.king@kitware.com> | 2008-02-03 17:24:50 -0500 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-02-03 17:24:50 -0500 |
commit | bbbb2be765856a8c40e71e5bf6fd703cc3d603aa (patch) | |
tree | 882f0a8a5105bd37ae5fd596242e3c192937b1b1 /Modules/CMakeTestCCompiler.cmake | |
parent | dc06ac58817672ca9931a4a4c177e18d679b6573 (diff) | |
download | cmake-bbbb2be765856a8c40e71e5bf6fd703cc3d603aa.tar.gz |
BUG: When forcing the C and CXX compilers do not try to detect the ABI information. Cleanup configured language compiler info files by always using @ONLY. This addresses bug#6297.
Diffstat (limited to 'Modules/CMakeTestCCompiler.cmake')
-rw-r--r-- | Modules/CMakeTestCCompiler.cmake | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/Modules/CMakeTestCCompiler.cmake b/Modules/CMakeTestCCompiler.cmake index 2a64f7c0c5..b3a4b0d315 100644 --- a/Modules/CMakeTestCCompiler.cmake +++ b/Modules/CMakeTestCCompiler.cmake @@ -42,13 +42,18 @@ ELSE(NOT CMAKE_C_COMPILER_WORKS) ENDIF(C_TEST_WAS_RUN) SET(CMAKE_C_COMPILER_WORKS 1 CACHE INTERNAL "") - # Try to identify the ABI and configure it into CMakeCCompiler.cmake - INCLUDE(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerABI.cmake) - CMAKE_DETERMINE_COMPILER_ABI(C ${CMAKE_ROOT}/Modules/CMakeCCompilerABI.c) - CONFIGURE_FILE( - ${CMAKE_ROOT}/Modules/CMakeCCompiler.cmake.in - ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCCompiler.cmake - @ONLY - ) + IF(CMAKE_C_COMPILER_FORCED) + # The compiler was forced by the CMAKE_FORCE_C_COMPILER macro. + # Assume the user has configured all compiler information. + ELSE(CMAKE_C_COMPILER_FORCED) + # Try to identify the ABI and configure it into CMakeCCompiler.cmake + INCLUDE(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerABI.cmake) + CMAKE_DETERMINE_COMPILER_ABI(C ${CMAKE_ROOT}/Modules/CMakeCCompilerABI.c) + CONFIGURE_FILE( + ${CMAKE_ROOT}/Modules/CMakeCCompiler.cmake.in + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCCompiler.cmake + @ONLY + ) + ENDIF(CMAKE_C_COMPILER_FORCED) ENDIF(NOT CMAKE_C_COMPILER_WORKS) |