diff options
author | Raul Tambre <raul@tambre.ee> | 2021-03-02 14:19:14 (GMT) |
---|---|---|
committer | Raul Tambre <raul@tambre.ee> | 2021-03-02 14:20:45 (GMT) |
commit | 1bd8f1945359318b97f61127bac000b887c41151 (patch) | |
tree | 633c07b4f3fa70a1cf7ac27323c2b68e8c1c9691 | |
parent | b212fba208df4f7184efa63b6c037d998ab18cd5 (diff) | |
download | CMake-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.cmake | 2 |
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() |