summaryrefslogtreecommitdiffstats
path: root/Utilities
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-10-21 19:08:07 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-10-21 19:08:07 (GMT)
commit95d84f76d9a8e27eb974fce7d06b7f2e312a05e6 (patch)
tree727105aeb6ebba64c18a3af64c207e50cf900104 /Utilities
parentc8ba39719409dc106f76c0b67f805158be01b3b4 (diff)
parent29c3edb87adedd82e816552d958f4c3540a1511b (diff)
downloadCMake-95d84f76d9a8e27eb974fce7d06b7f2e312a05e6.zip
CMake-95d84f76d9a8e27eb974fce7d06b7f2e312a05e6.tar.gz
CMake-95d84f76d9a8e27eb974fce7d06b7f2e312a05e6.tar.bz2
Merge topic 'cmake-cmp0054-warnings'
29c3edb8 Avoid if() quoted auto-dereference
Diffstat (limited to 'Utilities')
-rw-r--r--Utilities/cmlibarchive/CMakeLists.txt8
-rw-r--r--Utilities/cmliblzma/CMakeLists.txt4
2 files changed, 6 insertions, 6 deletions
diff --git a/Utilities/cmlibarchive/CMakeLists.txt b/Utilities/cmlibarchive/CMakeLists.txt
index 220a4c6..b150408 100644
--- a/Utilities/cmlibarchive/CMakeLists.txt
+++ b/Utilities/cmlibarchive/CMakeLists.txt
@@ -56,10 +56,10 @@ SET(CMAKE_REQUIRED_LIBRARIES)
SET(CMAKE_REQUIRED_FLAGS)
# Disable warnings to avoid changing 3rd party code.
-IF("${CMAKE_C_COMPILER_ID}" MATCHES
+IF(CMAKE_C_COMPILER_ID MATCHES
"^(GNU|Clang|AppleClang|XL|VisualAge|SunPro|MIPSpro|HP|Intel)$")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w")
-ELSEIF("${CMAKE_C_COMPILER_ID}" MATCHES "^(PathScale)$")
+ELSEIF(CMAKE_C_COMPILER_ID STREQUAL "PathScale")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -woffall")
ENDIF()
@@ -664,14 +664,14 @@ ENDMACRO(CHECK_CRYPTO_WIN CRYPTO_LIST)
MACRO(CHECK_ICONV LIB TRY_ICONV_CONST)
IF(NOT HAVE_ICONV)
CMAKE_PUSH_CHECK_STATE() # Save the state of the variables
- IF ("CMAKE_C_COMPILER_ID" MATCHES "^GNU$")
+ IF (CMAKE_C_COMPILER_ID STREQUAL "GNU")
#
# During checking iconv proto type, we should use -Werror to avoid the
# success of iconv detection with a warnig which success is a miss
# detection. So this needs for all build mode(even it's a release mode).
#
SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Werror")
- ENDIF ("CMAKE_C_COMPILER_ID" MATCHES "^GNU$")
+ ENDIF (CMAKE_C_COMPILER_ID STREQUAL "GNU")
IF (MSVC)
# NOTE: /WX option is the same as gcc's -Werror option.
SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} /WX")
diff --git a/Utilities/cmliblzma/CMakeLists.txt b/Utilities/cmliblzma/CMakeLists.txt
index 27ec2d0..c03147f 100644
--- a/Utilities/cmliblzma/CMakeLists.txt
+++ b/Utilities/cmliblzma/CMakeLists.txt
@@ -201,10 +201,10 @@ INCLUDE_DIRECTORIES(
)
# Disable warnings to avoid changing 3rd party code.
-IF("${CMAKE_C_COMPILER_ID}" MATCHES
+IF(CMAKE_C_COMPILER_ID MATCHES
"^(GNU|Clang|AppleClang|XL|VisualAge|SunPro|MIPSpro|HP|Intel)$")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w")
-ELSEIF("${CMAKE_C_COMPILER_ID}" MATCHES "^(PathScale)$")
+ELSEIF(CMAKE_C_COMPILER_ID STREQUAL "PathScale")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -woffall")
ENDIF()