summaryrefslogtreecommitdiffstats
path: root/Modules/GenerateExportHeader.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-09-29 19:53:13 (GMT)
committerBrad King <brad.king@kitware.com>2014-09-29 19:53:38 (GMT)
commit69fe5920b359398f9618f93e47d199ce889edc23 (patch)
tree93b6f85fe648b824fae97cc41caa62eff5853268 /Modules/GenerateExportHeader.cmake
parenta22570ea19904b08afae204f378c6f5febd7f534 (diff)
downloadCMake-69fe5920b359398f9618f93e47d199ce889edc23.zip
CMake-69fe5920b359398f9618f93e47d199ce889edc23.tar.gz
CMake-69fe5920b359398f9618f93e47d199ce889edc23.tar.bz2
GenerateExportHeader: Avoid if() quoted auto-dereference
When testing CMAKE_CXX_COMPILER_ID values with if(MATCHES), do not explicitly dereference or quote CMAKE_CXX_COMPILER_ID. We want if() to auto-dereference the variable and not its value.
Diffstat (limited to 'Modules/GenerateExportHeader.cmake')
-rw-r--r--Modules/GenerateExportHeader.cmake14
1 files changed, 7 insertions, 7 deletions
diff --git a/Modules/GenerateExportHeader.cmake b/Modules/GenerateExportHeader.cmake
index f00b577..0c6256c 100644
--- a/Modules/GenerateExportHeader.cmake
+++ b/Modules/GenerateExportHeader.cmake
@@ -217,9 +217,9 @@ macro(_test_compiler_hidden_visibility)
AND NOT _INTEL_TOO_OLD
AND NOT WIN32
AND NOT CYGWIN
- AND NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES XL
- AND NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES PGI
- AND NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES Watcom)
+ AND NOT CMAKE_CXX_COMPILER_ID MATCHES XL
+ AND NOT CMAKE_CXX_COMPILER_ID MATCHES PGI
+ AND NOT CMAKE_CXX_COMPILER_ID MATCHES Watcom)
check_cxx_compiler_flag(-fvisibility=hidden COMPILER_HAS_HIDDEN_VISIBILITY)
check_cxx_compiler_flag(-fvisibility-inlines-hidden
COMPILER_HAS_HIDDEN_INLINE_VISIBILITY)
@@ -230,11 +230,11 @@ macro(_test_compiler_hidden_visibility)
endmacro()
macro(_test_compiler_has_deprecated)
- if("${CMAKE_CXX_COMPILER_ID}" MATCHES Borland
- OR "${CMAKE_CXX_COMPILER_ID}" MATCHES HP
+ if(CMAKE_CXX_COMPILER_ID MATCHES Borland
+ OR CMAKE_CXX_COMPILER_ID MATCHES HP
OR GCC_TOO_OLD
- OR "${CMAKE_CXX_COMPILER_ID}" MATCHES PGI
- OR "${CMAKE_CXX_COMPILER_ID}" MATCHES Watcom)
+ OR CMAKE_CXX_COMPILER_ID MATCHES PGI
+ OR CMAKE_CXX_COMPILER_ID MATCHES Watcom)
set(COMPILER_HAS_DEPRECATED "" CACHE INTERNAL
"Compiler support for a deprecated attribute")
else()