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. --- Modules/CMakeDetermineCompilerId.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Modules/CMakeDetermineCompilerId.cmake') diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index a7b5760ba4..9ab159a6ca 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -48,7 +48,7 @@ function(CMAKE_DETERMINE_COMPILER_ID lang flagvar src) CMAKE_DETERMINE_COMPILER_ID_VENDOR(${lang}) endif() - if (COMPILER_QNXNTO AND CMAKE_${lang}_COMPILER_ID STREQUAL GNU) + if (COMPILER_QNXNTO AND CMAKE_${lang}_COMPILER_ID STREQUAL "GNU") execute_process( COMMAND "${CMAKE_${lang}_COMPILER}" -V -- cgit v1.2.1