From 1bd8f1945359318b97f61127bac000b887c41151 Mon Sep 17 00:00:00 2001 From: Raul Tambre Date: Tue, 2 Mar 2021 16:19:14 +0200 Subject: CMakeDetermineCompilerId: Fix REQUIRE_SUCCESS with multiple user flags Need to quote the list expansion otherwise we'll try each argument separately. --- Modules/CMakeDetermineCompilerId.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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() -- cgit v0.12