summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaul Tambre <raul@tambre.ee>2021-03-02 14:19:14 (GMT)
committerRaul Tambre <raul@tambre.ee>2021-03-02 14:20:45 (GMT)
commit1bd8f1945359318b97f61127bac000b887c41151 (patch)
tree633c07b4f3fa70a1cf7ac27323c2b68e8c1c9691
parentb212fba208df4f7184efa63b6c037d998ab18cd5 (diff)
downloadCMake-1bd8f1945359318b97f61127bac000b887c41151.zip
CMake-1bd8f1945359318b97f61127bac000b887c41151.tar.gz
CMake-1bd8f1945359318b97f61127bac000b887c41151.tar.bz2
CMakeDetermineCompilerId: Fix REQUIRE_SUCCESS with multiple user flags
Need to quote the list expansion otherwise we'll try each argument separately.
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index e688bcd..1595cfd 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -43,7 +43,7 @@ function(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
set(__compiler_id_require_success TRUE)
endif()
- foreach(userflags ${CMAKE_${lang}_COMPILER_ID_FLAGS_LIST} "")
+ foreach(userflags "${CMAKE_${lang}_COMPILER_ID_FLAGS_LIST}" "")
__determine_compiler_id_test("${CMAKE_${lang}_COMPILER_ID_TEST_FLAGS_FIRST}" "${userflags}")
if(CMAKE_${lang}_COMPILER_ID)
break()