fix(build): fix passing CMAKE_<LANG>_FLAGS from ExternalProject_Add

This commit is contained in:
Alexey Lapshin
2026-03-13 17:23:11 +08:00
committed by BOT
parent 4bb6ab870c
commit 338cc50125
13 changed files with 115 additions and 4 deletions
+2
View File
@@ -4,6 +4,8 @@
# Remove duplicates from a string containing compilation flags
function(remove_duplicated_flags FLAGS UNIQFLAGS)
set(FLAGS_LIST "${FLAGS}")
# Remove leading and trailing spaces
string(STRIP "${FLAGS_LIST}" FLAGS_LIST)
# Convert the given flags, as a string, into a CMake list type
separate_arguments(FLAGS_LIST)
# Remove all the duplicated flags