summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2021-12-23 11:27:36 +0300
committerIvan Maidanski <ivmai@mail.ru>2021-12-23 11:27:36 +0300
commit93786f74a71b6214788df811ee545c2ed32f9e94 (patch)
treeb40f47878a69a6e0dad2161aca3b6d16e3146e3c
parent806a08fbe63e88e85f3663edc25763d80bdde89b (diff)
downloadbdwgc-93786f74a71b6214788df811ee545c2ed32f9e94.tar.gz
Support space-separated flags in CFLAGS_EXTRA passed to CMake
(fix of commit b6ac6a5a4) * CMakeLists.txt [CFLAGS_EXTRA] (CFLAGS_EXTRA): Apply separate_arguments(UNIX_COMMAND).
-rw-r--r--CMakeLists.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5207a6e8..21132ef0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -417,7 +417,8 @@ endif()
# Extra user-defined flags to pass both to C and C++ compilers.
if (DEFINED CFLAGS_EXTRA)
- add_compile_options(${CFLAGS_EXTRA})
+ separate_arguments(CFLAGS_EXTRA_LIST UNIX_COMMAND "${CFLAGS_EXTRA}")
+ add_compile_options(${CFLAGS_EXTRA_LIST})
endif()
# Check whether execinfo.h header file is present.