summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-03-27 11:42:33 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-03-27 11:43:02 (GMT)
commitf6c3820549affa910ec5f710ec61f1f3414b13ab (patch)
tree5a75d3a7b7611489b682d62c7fc6c381be1c78aa /Modules
parent1915a09884c40b4eed29de871962fe783ca17fe0 (diff)
parent4b8297721f3c7786c1a989b41a78ead231091704 (diff)
downloadCMake-f6c3820549affa910ec5f710ec61f1f3414b13ab.zip
CMake-f6c3820549affa910ec5f710ec61f1f3414b13ab.tar.gz
CMake-f6c3820549affa910ec5f710ec61f1f3414b13ab.tar.bz2
Merge topic 'CheckIPOSupported-cleanup-cache' into release-3.17
4b8297721f CheckIPOSupported: Avoid polluting cache with common name 'result' Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Kyle Edwards <kyle.edwards@kitware.com> Merge-request: !4528
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CheckIPOSupported.cmake6
1 files changed, 4 insertions, 2 deletions
diff --git a/Modules/CheckIPOSupported.cmake b/Modules/CheckIPOSupported.cmake
index 0d6ad20..90a9f61 100644
--- a/Modules/CheckIPOSupported.cmake
+++ b/Modules/CheckIPOSupported.cmake
@@ -113,7 +113,7 @@ macro(_ipo_run_language_check language)
endforeach()
try_compile(
- result
+ _IPO_LANGUAGE_CHECK_RESULT
"${bindir}"
"${srcdir}"
"${TRY_COMPILE_PROJECT_NAME}"
@@ -122,8 +122,10 @@ macro(_ipo_run_language_check language)
"-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON"
OUTPUT_VARIABLE output
)
+ set(_IPO_LANGUAGE_CHECK_RESULT "${_IPO_LANGUAGE_CHECK_RESULT}")
+ unset(_IPO_LANGUAGE_CHECK_RESULT CACHE)
- if(NOT result)
+ if(NOT _IPO_LANGUAGE_CHECK_RESULT)
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"${language} compiler IPO check failed with the following output:\n"
"${output}\n")