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 /Modules/CMakeForceCompiler.cmake | |
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 'Modules/CMakeForceCompiler.cmake')
-rw-r--r-- | Modules/CMakeForceCompiler.cmake | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/CMakeForceCompiler.cmake b/Modules/CMakeForceCompiler.cmake index 0e6b5af..1d8b110 100644 --- a/Modules/CMakeForceCompiler.cmake +++ b/Modules/CMakeForceCompiler.cmake @@ -70,7 +70,7 @@ macro(CMAKE_FORCE_C_COMPILER compiler id) set(CMAKE_C_COMPILER_FORCED TRUE) # Set old compiler id variables. - if("${CMAKE_C_COMPILER_ID}" MATCHES "GNU") + if(CMAKE_C_COMPILER_ID MATCHES "GNU") set(CMAKE_COMPILER_IS_GNUCC 1) endif() endmacro() @@ -94,7 +94,7 @@ macro(CMAKE_FORCE_Fortran_COMPILER compiler id) set(CMAKE_Fortran_COMPILER_FORCED TRUE) # Set old compiler id variables. - if("${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU") + if(CMAKE_Fortran_COMPILER_ID MATCHES "GNU") set(CMAKE_COMPILER_IS_GNUG77 1) endif() endmacro() |