Feature request: How about a HOST_SYSTEM_PATH_LIST_SEPARATOR variable
or something similar? ';' on Windows, ':' on unix-type systems.
Primary use-case I'm looking at is parsing or manipulation of PATH environment variable. Introduction of cmake command line tool mode (cmake -E ...) has lessened the need for generating platform specific scripts in order to invoke external processes with custom environment variable values, but one of the more common environment variable modifications is the PATH variable, and if the modification is anything other than an overwrite with a singular path, we're back in the position of having to write platform conditional code in order to figure out what separator character to use.
I want to be able to write
add_custom_command(TARGET foo
PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E env "PATH=my_special_path${HOST_SYSTEM_PATH_LIST_SEPARATOR}$ENV{PATH}" mycommand
...