summaryrefslogtreecommitdiff
path: root/Modules/CMakeTestCXXCompiler.cmake
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2005-01-20 12:30:03 -0500
committerBill Hoffman <bill.hoffman@kitware.com>2005-01-20 12:30:03 -0500
commit36dd18efce8c87bf6ce7d49c961987fc4f22324c (patch)
treeb70e7b6598a77895c4a5998a007f39b13600b72d /Modules/CMakeTestCXXCompiler.cmake
parentbeb584e7a1d73901d1b0494e5c60d25df6d6ef68 (diff)
downloadcmake-36dd18efce8c87bf6ce7d49c961987fc4f22324c.tar.gz
ENH: stuff to keep compiler tests from re-running all the time
Diffstat (limited to 'Modules/CMakeTestCXXCompiler.cmake')
-rw-r--r--Modules/CMakeTestCXXCompiler.cmake12
1 files changed, 8 insertions, 4 deletions
diff --git a/Modules/CMakeTestCXXCompiler.cmake b/Modules/CMakeTestCXXCompiler.cmake
index 49bf695ab1..4dff11d56a 100644
--- a/Modules/CMakeTestCXXCompiler.cmake
+++ b/Modules/CMakeTestCXXCompiler.cmake
@@ -13,6 +13,7 @@ IF(NOT CMAKE_CXX_COMPILER_WORKS)
TRY_COMPILE(CMAKE_CXX_COMPILER_WORKS ${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}/CMakeTmp/testCXXCompiler.cxx
OUTPUT_VARIABLE OUTPUT)
+ SET(CXX_TEST_WAS_RUN 1)
ENDIF(NOT CMAKE_CXX_COMPILER_WORKS)
IF(NOT CMAKE_CXX_COMPILER_WORKS)
@@ -25,8 +26,11 @@ IF(NOT CMAKE_CXX_COMPILER_WORKS)
"with the following output:\n ${OUTPUT}\n\n"
"CMake will not be able to correctly generate this project.")
ELSE(NOT CMAKE_CXX_COMPILER_WORKS)
- MESSAGE(STATUS "Check for working CXX compiler: ${CMAKE_CXX_COMPILER} -- works")
- FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeOutput.log
- "Determining if the CXX compiler works passed with "
- "the following output:\n${OUTPUT}\n\n")
+ IF(CXX_TEST_WAS_RUN)
+ MESSAGE(STATUS "Check for working CXX compiler: ${CMAKE_CXX_COMPILER} -- works")
+ FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeOutput.log
+ "Determining if the CXX compiler works passed with "
+ "the following output:\n${OUTPUT}\n\n")
+ ENDIF(CXX_TEST_WAS_RUN)
+ SET(CMAKE_CXX_COMPILER_WORKS 1 CACHE INTERNAL "")
ENDIF(NOT CMAKE_CXX_COMPILER_WORKS)