Description | When using CMake with CTEST_USE_LAUNCHERS, the RULE_LAUNCHER_COMPILE property is set to a special command used for better integration with the CTest system.
While it works correctly with Ninja on most platforms (you'll need to change a if generator is make to is generator is make or ninja in CTest.cmake), it doesn't work with Visual Studio because of the cldeps stuff.
Indeed, what Ninja generates is the following:
"C:/Program Files (x86)/CMake 2.8/bin/cmcldeps.exe" CXX $in "$DEP_FILE" $out "Note: including file: " "C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/cl.exe" "C:/Program Files (x86)/CMake 2.8/bin/ctest.exe" --launch --target-name project --build-dir C:\Users\mgaunard\build\project\src --output $out --source $in --language CXX -- C:\PROGRA~2\MICROS~2.0\VC\bin\cl.exe /nologo $FLAGS $DEFINES /TP /Fo$out /Fd$TARGET_PDB -c $in
This is obviously incorrect, it should be
"C:/Program Files (x86)/CMake 2.8/bin/ctest.exe" --launch --target-name project --build-dir C:\Users\mgaunard\build\project\src --output $out --source $in --language CXX -- "C:/Program Files (x86)/CMake 2.8/bin/cmcldeps.exe" CXX $in "$DEP_FILE" $out "Note: including file: " "C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/cl.exe" C:\PROGRA~2\MICROS~2.0\VC\bin\cl.exe /nologo $FLAGS $DEFINES /TP /Fo$out /Fd$TARGET_PDB -c $in |