I think it should be super trivial, but seems like it's not supported... Is it even possible in CMake to have one value of a list contain a semicolon?
The reason is super simple - because I'm running on Windows, and on Windows the semicolon is the separator between two or more folders in one environment variable (i.e. PATH
).
list(
APPEND
MY_TEST_ENVIRONMENT
"MY_FLAG=1"
)
# <...>
list(
APPEND
MY_TEST_ENVIRONMENT
"PATH=first_folder_path;second_folder_path"
# ^--- here is the problem
)
# <...>
set_property(TEST MyTests PROPERTY ENVIRONMENT ${MY_TEST_ENVIRONMENT})
I tried removing and adding double quotes, I tried escaping \;
, I tried to add same env variable two times - but none of those work!