summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-12-13 12:50:46 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-12-13 12:50:52 (GMT)
commitf0b3fab179d0ebad7e0bcc6e564d989f992bcb84 (patch)
tree678632a672422ba96a36afc1db346bd6251a7393
parent95e86eafd71928dbdcdcd135951a172891eb6189 (diff)
parent4dae55fb70de42c2b55676f78ea7f0c6c8ad51b4 (diff)
downloadCMake-f0b3fab179d0ebad7e0bcc6e564d989f992bcb84.zip
CMake-f0b3fab179d0ebad7e0bcc6e564d989f992bcb84.tar.gz
CMake-f0b3fab179d0ebad7e0bcc6e564d989f992bcb84.tar.bz2
Merge topic 'irsl-msvc-omp-fix'
4dae55fb IRSL: Fix MSVC variable deferencing Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1588
-rw-r--r--Modules/InstallRequiredSystemLibraries.cmake9
1 files changed, 7 insertions, 2 deletions
diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake
index 38e0861..8d84bf4 100644
--- a/Modules/InstallRequiredSystemLibraries.cmake
+++ b/Modules/InstallRequiredSystemLibraries.cmake
@@ -56,10 +56,13 @@
# Specify the :command:`install(PROGRAMS)` command ``COMPONENT``
# option. If not specified, no such option will be used.
+cmake_policy(PUSH)
+cmake_policy(SET CMP0054 NEW) # if() quoted variables not dereferenced
+
set(_IRSL_HAVE_Intel FALSE)
set(_IRSL_HAVE_MSVC FALSE)
foreach(LANG IN ITEMS C CXX Fortran)
- if(CMAKE_${LANG}_COMPILER_ID STREQUAL Intel)
+ if("${CMAKE_${LANG}_COMPILER_ID}" STREQUAL "Intel")
if(NOT _IRSL_HAVE_Intel)
get_filename_component(_Intel_basedir "${CMAKE_${LANG}_COMPILER}" PATH)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
@@ -81,7 +84,7 @@ foreach(LANG IN ITEMS C CXX Fortran)
endif()
set(_IRSL_HAVE_Intel TRUE)
endif()
- elseif(CMAKE_${LANG}_COMPILER_ID STREQUAL MSVC)
+ elseif("${CMAKE_${LANG}_COMPILER_ID}" STREQUAL "MSVC")
set(_IRSL_HAVE_MSVC TRUE)
endif()
endforeach()
@@ -743,3 +746,5 @@ if(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS)
)
endif()
endif()
+
+cmake_policy(POP)