summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeTestCCompiler.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-02-03 22:24:50 (GMT)
committerBrad King <brad.king@kitware.com>2008-02-03 22:24:50 (GMT)
commitbbbb2be765856a8c40e71e5bf6fd703cc3d603aa (patch)
tree882f0a8a5105bd37ae5fd596242e3c192937b1b1 /Modules/CMakeTestCCompiler.cmake
parentdc06ac58817672ca9931a4a4c177e18d679b6573 (diff)
downloadCMake-bbbb2be765856a8c40e71e5bf6fd703cc3d603aa.zip
CMake-bbbb2be765856a8c40e71e5bf6fd703cc3d603aa.tar.gz
CMake-bbbb2be765856a8c40e71e5bf6fd703cc3d603aa.tar.bz2
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.cmake21
1 files changed, 13 insertions, 8 deletions
diff --git a/Modules/CMakeTestCCompiler.cmake b/Modules/CMakeTestCCompiler.cmake
index 2a64f7c..b3a4b0d 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)