project_options
project_options copied to clipboard
fix: support iterating list containing generator expressions that have semicolons
Add a function convert_genex_semicolons to convert semicolons inside generator expressions into $<SEMICOLON>. After this function, the list contains generator expressions can be properly iterated.
set(dirs "$<$<CONFIG:Debug>:dir1;dir2>" "$<$<CONFIG:Release>:dir3;dir4>")
convert_genex_semicolons("${dirs}" dirs)
# now dirs is "$<$<CONFIG:Debug>:dir1$<SEMICOLON>dir2>;$<$<CONFIG:Release>:dir3$<SEMICOLON>dir4>"
foreach(dir IN LISTS dirs)
# element 0: "$<$<CONFIG:Debug>:dir1$<SEMICOLON>dir2>"
# element 1: "$<$<CONFIG:Release>:dir3$<SEMICOLON>dir4>"
endforeach()
Close #205