mirror of
https://github.com/apache/nuttx.git
synced 2026-09-03 23:52:58 +00:00
cmake: parse EXTRAFLAGS with separate_arguments.
string(REPLACE) splits on every space, so a flag such as -I"/path with spaces" becomes several bogus compile options. Use separate_arguments(UNIX_COMMAND), matching EXTRA_FLAGS. Signed-off-by: Zhaoqi Xu <lzy00419@outlook.com>
This commit is contained in:
parent
06d6e895da
commit
f5df0fcb18
1 changed files with 2 additions and 2 deletions
|
|
@ -55,8 +55,8 @@ function(nuttx_add_library_internal target)
|
|||
# add extra flags into command line
|
||||
|
||||
if(DEFINED EXTRAFLAGS)
|
||||
string(REPLACE " " ";" eflags "${EXTRAFLAGS}")
|
||||
target_compile_options(${target} PRIVATE ${eflags})
|
||||
separate_arguments(EXTRAFLAGS_LIST UNIX_COMMAND "${EXTRAFLAGS}")
|
||||
target_compile_options(${target} PRIVATE ${EXTRAFLAGS_LIST})
|
||||
endif()
|
||||
|
||||
# Set install config for all library
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue