From 29c3edb87adedd82e816552d958f4c3540a1511b Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Tue, 14 Oct 2014 10:25:32 -0400 Subject: Avoid if() quoted auto-dereference When testing CMAKE__COMPILER_ID values, do not explicitly dereference or quote the variable. We want if() to auto-dereference the variable and not its value. Also replace MATCHES with STREQUAL where equivalent. --- Utilities/cmliblzma/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Utilities/cmliblzma') diff --git a/Utilities/cmliblzma/CMakeLists.txt b/Utilities/cmliblzma/CMakeLists.txt index 23549c586f..4f2b9babee 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") ELSEIF(BORLAND) SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w-") -- cgit v1.2.1