summaryrefslogtreecommitdiff
path: root/Modules/Platform/eCos.cmake
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2014-10-14 10:25:32 -0400
committerBen Boeckel <ben.boeckel@kitware.com>2014-10-20 11:49:16 -0400
commit29c3edb87adedd82e816552d958f4c3540a1511b (patch)
tree089cea993a6c212b2107554eeca443e48993ca08 /Modules/Platform/eCos.cmake
parenta7596fef6e8d6938ce0d7fcba47e896f288b12b4 (diff)
downloadcmake-29c3edb87adedd82e816552d958f4c3540a1511b.tar.gz
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 'Modules/Platform/eCos.cmake')
-rw-r--r--Modules/Platform/eCos.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/Platform/eCos.cmake b/Modules/Platform/eCos.cmake
index a203826926..e1279ef228 100644
--- a/Modules/Platform/eCos.cmake
+++ b/Modules/Platform/eCos.cmake
@@ -28,7 +28,7 @@ include(Platform/UnixPaths)
# eCos can be built only with gcc
get_property(_IN_TC GLOBAL PROPERTY IN_TRY_COMPILE)
-if(CMAKE_C_COMPILER AND NOT "${CMAKE_C_COMPILER_ID}" MATCHES "GNU" AND NOT _IN_TC)
+if(CMAKE_C_COMPILER AND NOT CMAKE_C_COMPILER_ID MATCHES "GNU" AND NOT _IN_TC)
message(FATAL_ERROR "GNU gcc is required for eCos")
endif()
if(CMAKE_CXX_COMPILER AND NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU" AND NOT _IN_TC)