From 93786f74a71b6214788df811ee545c2ed32f9e94 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Thu, 23 Dec 2021 11:27:36 +0300 Subject: 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). --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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. -- cgit v1.2.1