diff options
Diffstat (limited to 'Modules/CMakeTestCXXCompiler.cmake')
-rw-r--r-- | Modules/CMakeTestCXXCompiler.cmake | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Modules/CMakeTestCXXCompiler.cmake b/Modules/CMakeTestCXXCompiler.cmake index 49bf695..4dff11d 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) |