summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-03-10 15:35:59 (GMT)
committerBrad King <brad.king@kitware.com>2017-03-10 15:46:11 (GMT)
commit8fc934de0e9667a83712ab7b460d63c309b86571 (patch)
treeb53f094607447c77b963a0ab519111be85c615ef /Modules/Compiler
parentb9d36826c5676bf3d0bb55fb47c6ce62f4f3470d (diff)
downloadCMake-8fc934de0e9667a83712ab7b460d63c309b86571.zip
CMake-8fc934de0e9667a83712ab7b460d63c309b86571.tar.gz
CMake-8fc934de0e9667a83712ab7b460d63c309b86571.tar.bz2
GNU-FindBinUtils: Avoid setting policy CMP0054
The `cmake_policy(SET)` call triggers `CMP0011` warnings when this module is used in a project that does not set `CMP0011` to NEW. We could avoid these with a `cmake_policy` PUSH/POP pair, but it is simpler to adjust our code to not trigger `CMP0054` in the first place.
Diffstat (limited to 'Modules/Compiler')
-rw-r--r--Modules/Compiler/GNU-FindBinUtils.cmake4
1 files changed, 1 insertions, 3 deletions
diff --git a/Modules/Compiler/GNU-FindBinUtils.cmake b/Modules/Compiler/GNU-FindBinUtils.cmake
index e314eb9..466d4cf 100644
--- a/Modules/Compiler/GNU-FindBinUtils.cmake
+++ b/Modules/Compiler/GNU-FindBinUtils.cmake
@@ -1,6 +1,4 @@
-cmake_policy(SET CMP0054 NEW)
-
-if("${_CMAKE_PROCESSING_LANGUAGE}" STREQUAL "")
+if(NOT DEFINED _CMAKE_PROCESSING_LANGUAGE OR _CMAKE_PROCESSING_LANGUAGE STREQUAL "")
message(FATAL_ERROR "Internal error: _CMAKE_PROCESSING_LANGUAGE is not set")
endif()