summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-08-19 14:24:58 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-08-19 14:25:15 (GMT)
commit4aaddce2be4eb8360193bb0441c3c06260974349 (patch)
treecd7b3abadb66f95342236be968c4b07b64f27c82
parent39ce3b469f69adc79af2fc18f854cd33e46d295d (diff)
parent89ed11ae6f98319bbba2c34e7c0e1d1a5c8dd547 (diff)
downloadCMake-4aaddce2be4eb8360193bb0441c3c06260974349.zip
CMake-4aaddce2be4eb8360193bb0441c3c06260974349.tar.gz
CMake-4aaddce2be4eb8360193bb0441c3c06260974349.tar.bz2
Merge topic 'CheckLanguage-CMP0126'
89ed11ae6f CheckLanguage: Avoid CMP0126 warning Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6462
-rw-r--r--Modules/CheckLanguage.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/CheckLanguage.cmake b/Modules/CheckLanguage.cmake
index 928881c..559c103 100644
--- a/Modules/CheckLanguage.cmake
+++ b/Modules/CheckLanguage.cmake
@@ -36,6 +36,9 @@ Example:
include_guard(GLOBAL)
+cmake_policy(PUSH)
+cmake_policy(SET CMP0126 NEW)
+
macro(check_language lang)
if(NOT DEFINED CMAKE_${lang}_COMPILER)
set(_desc "Looking for a ${lang} compiler")
@@ -110,3 +113,5 @@ file(WRITE \"\${CMAKE_CURRENT_BINARY_DIR}/result.cmake\"
endif()
endmacro()
+
+cmake_policy(POP)