diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2014-10-14 14:25:32 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2014-10-20 15:49:16 (GMT) |
commit | 29c3edb87adedd82e816552d958f4c3540a1511b (patch) | |
tree | 089cea993a6c212b2107554eeca443e48993ca08 /Tests/ModuleDefinition | |
parent | a7596fef6e8d6938ce0d7fcba47e896f288b12b4 (diff) | |
download | CMake-29c3edb87adedd82e816552d958f4c3540a1511b.zip CMake-29c3edb87adedd82e816552d958f4c3540a1511b.tar.gz CMake-29c3edb87adedd82e816552d958f4c3540a1511b.tar.bz2 |
Avoid if() quoted auto-dereference
When testing CMAKE_<LANG>_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.
Diffstat (limited to 'Tests/ModuleDefinition')
-rw-r--r-- | Tests/ModuleDefinition/CMakeLists.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Tests/ModuleDefinition/CMakeLists.txt b/Tests/ModuleDefinition/CMakeLists.txt index a30f643..bfbb343 100644 --- a/Tests/ModuleDefinition/CMakeLists.txt +++ b/Tests/ModuleDefinition/CMakeLists.txt @@ -13,7 +13,7 @@ add_custom_command(OUTPUT example_dll_gen.def add_library(example_dll_gen SHARED example_dll_gen.c example_dll_gen.def) # Test /DEF:<file> flag recognition for VS. -if(MSVC OR "${CMAKE_C_COMPILER_ID}" MATCHES "^(Intel)$") +if(MSVC OR CMAKE_C_COMPILER_ID STREQUAL "Intel") add_library(example_dll_2 SHARED example_dll_2.c) set_property(TARGET example_dll_2 PROPERTY LINK_FLAGS /DEF:"${ModuleDefinition_SOURCE_DIR}/example_dll_2.def") |