diff options
author | Brad King <brad.king@kitware.com> | 2012-08-24 19:15:14 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2012-08-24 19:15:14 (GMT) |
commit | e5fee8a7c2873531c8e8e8ee991e8d0697f9bf73 (patch) | |
tree | f63ad4fd1723340740d3b08abb800a3ce016563f /Modules/CMakeDetermineCompilerABI.cmake | |
parent | 3df81b49126cf6dc3e4e9a8fa8c368f33886db54 (diff) | |
download | CMake-e5fee8a7c2873531c8e8e8ee991e8d0697f9bf73.zip CMake-e5fee8a7c2873531c8e8e8ee991e8d0697f9bf73.tar.gz CMake-e5fee8a7c2873531c8e8e8ee991e8d0697f9bf73.tar.bz2 |
Store ABI detection results in compiler information files
Drop use of cache entry CMAKE_DETERMINE_<LANG>_ABI_COMPILED and replace
it with variable CMAKE_<LANG>_ABI_COMPILED. Since the grandparent
commit this test result is specific to the version of CMake. Store it
in the version-specific compiler information files instead of
CMakeCache.txt so testing can be re-done to meet the requirements of the
current version of CMake even if another version of CMake was already
used to configure the build tree.
Diffstat (limited to 'Modules/CMakeDetermineCompilerABI.cmake')
-rw-r--r-- | Modules/CMakeDetermineCompilerABI.cmake | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Modules/CMakeDetermineCompilerABI.cmake b/Modules/CMakeDetermineCompilerABI.cmake index ee4b60e..75247d9 100644 --- a/Modules/CMakeDetermineCompilerABI.cmake +++ b/Modules/CMakeDetermineCompilerABI.cmake @@ -19,7 +19,7 @@ include(${CMAKE_ROOT}/Modules/CMakeParseImplicitLinkInfo.cmake) function(CMAKE_DETERMINE_COMPILER_ABI lang src) - if(NOT DEFINED CMAKE_DETERMINE_${lang}_ABI_COMPILED) + if(NOT DEFINED CMAKE_${lang}_ABI_COMPILED) message(STATUS "Detecting ${lang} compiler ABI info") # Compile the ABI identification source. @@ -28,7 +28,7 @@ function(CMAKE_DETERMINE_COMPILER_ABI lang src) if(DEFINED CMAKE_${lang}_VERBOSE_FLAG) set(CMAKE_FLAGS "-DCMAKE_EXE_LINKER_FLAGS=${CMAKE_${lang}_VERBOSE_FLAG}") endif() - try_compile(CMAKE_DETERMINE_${lang}_ABI_COMPILED + try_compile(CMAKE_${lang}_ABI_COMPILED ${CMAKE_BINARY_DIR} ${src} CMAKE_FLAGS "${CMAKE_FLAGS}" "-DCMAKE_${lang}_STANDARD_LIBRARIES=" @@ -39,9 +39,13 @@ function(CMAKE_DETERMINE_COMPILER_ABI lang src) OUTPUT_VARIABLE OUTPUT COPY_FILE "${BIN}" ) + # Move result from cache to normal variable. + set(CMAKE_${lang}_ABI_COMPILED ${CMAKE_${lang}_ABI_COMPILED}) + unset(CMAKE_${lang}_ABI_COMPILED CACHE) + set(CMAKE_${lang}_ABI_COMPILED ${CMAKE_${lang}_ABI_COMPILED} PARENT_SCOPE) # Load the resulting information strings. - if(CMAKE_DETERMINE_${lang}_ABI_COMPILED) + if(CMAKE_${lang}_ABI_COMPILED) message(STATUS "Detecting ${lang} compiler ABI info - done") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Detecting ${lang} compiler ABI info compiled with the following output:\n${OUTPUT}\n\n") |