From 2e70950c0f6093911828c7287fa7f35ac540de52 Mon Sep 17 00:00:00 2001 From: schraf Date: Sat, 29 Dec 2018 17:06:21 -0500 Subject: [PATCH] Fix quoting of CMAKE_C_COMPILER_ID I was getting an error in this cmake file when using 3.10.2 on linux. Here was the error message I was getting: [cmake] CMake Error at external/glfw/src/CMakeLists.txt:82 (if): [cmake] if given arguments: [cmake] [cmake] "STREQUAL" "GNU" "OR" "STREQUAL" "Clang" [cmake] [cmake] Unknown arguments specified Adding the quotes around the cmake variables seems to do the trick. That was also done with the STREQUAL condition earlier on line 66. Closes #1411. --- src/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6bf4ff0d..31f0556d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -79,7 +79,7 @@ endif() # Make GCC and Clang warn about declarations that VS 2010 and 2012 won't accept # for all source files that VS will build -if (${CMAKE_C_COMPILER_ID} STREQUAL GNU OR ${CMAKE_C_COMPILER_ID} STREQUAL Clang) +if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang") if (WIN32) set(windows_SOURCES ${glfw_SOURCES}) else()