cmake: Remove SHELL: tag in process_flags function
When fetching include, system include, compiler options, or compiler
defines, then it is important to strip the SHELL: (no de-duplication)
tag of any flag.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
diff --git a/cmake/extensions.cmake b/cmake/extensions.cmake
index a08d251..95ce0bb 100644
--- a/cmake/extensions.cmake
+++ b/cmake/extensions.cmake
@@ -293,6 +293,11 @@
endforeach()
if(NOT is_compile_lang_generator_expression)
+ # SHELL is used to avoid de-deplucation, but when process flags
+ # then this tag must be removed to return real compile/linker flags.
+ if(flag MATCHES "SHELL:[ ]*(.*)")
+ separate_arguments(flag UNIX_COMMAND ${CMAKE_MATCH_1})
+ endif()
list(APPEND tmp_list ${flag})
endif()
endforeach()