OUTPUT containing a "#" is not allowed.
When using CMake on Windows and Linux, if there is #
in project directory, I found difference. Seems like Windows users should always keep no #
in project path, while cmake in Linux can handle that.
To be precise, I notice these senarios:
-
add_subdirectory("#hello")
fail on Windows -
add_subdirectory("#hello", hello. Out)
success on Windows - Root of project directory is
#z
, then failed on Windows, even if changingRUNTIME_OUTPUT_DIRECTORY
to absolute path without#
.
The error is like:
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done (3.3s)
CMake Error in CMakeLists.txt:
OUTPUT containing a "#" is not allowed.