Commit 9bf03363 authored by Ben Boeckel's avatar Ben Boeckel
Browse files

Avoid if() quoted auto-dereference

When testing CMAKE_C_COMPILER_ID values, do not explicitly dereference
or quote the variable.  We want if() to auto-dereference the variable
and not its value.  While at it, use STREQUAL instead of MATCHES.

Change-Id: I7098fb6474500605b0fe78d764dd2d8afe385f50
parent 5bf91dda
......@@ -1075,7 +1075,7 @@ ENDIF(KWSYS_ENABLE_C AND KWSYS_C_SRCS)
ADD_DEFINITIONS("-DKWSYS_NAMESPACE=${KWSYS_NAMESPACE}")
# Disable deprecation warnings for standard C functions.
IF(MSVC OR (WIN32 AND "${CMAKE_C_COMPILER_ID}" MATCHES "^(Intel)$"))
IF(MSVC OR (WIN32 AND CMAKE_C_COMPILER_ID STREQUAL "Intel"))
ADD_DEFINITIONS(
-D_CRT_NONSTDC_NO_DEPRECATE
-D_CRT_SECURE_NO_DEPRECATE
......@@ -1232,7 +1232,7 @@ IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR)
ENDFOREACH(n)
# Some Apple compilers produce bad optimizations in this source.
IF(APPLE AND "${CMAKE_C_COMPILER_ID}" MATCHES "^(GNU|LLVM)$")
IF(APPLE AND CMAKE_C_COMPILER_ID MATCHES "^(GNU|LLVM)$")
SET_SOURCE_FILES_PROPERTIES(testProcess.c PROPERTIES COMPILE_FLAGS -O0)
ELSEIF(CMAKE_C_COMPILER_ID STREQUAL "XL")
# Tell IBM XL not to warn about our test infinite loop
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment