MantisBT - CMake
View Issue Details
0013743CMakeCMakepublic2012-11-26 19:002013-05-06 09:32
Mathias Gaunard 
Peter Kuemmel 
normalminoralways
closedfixed 
CMake 2.8.9 
CMake 2.8.11 
0013743: Ninja does not work with CTest launchers
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
No tags attached.
Issue History
2012-11-26 19:00Mathias GaunardNew Issue
2012-11-26 19:18Mathias GaunardNote Added: 0031721
2012-11-29 21:50Mathias GaunardNote Added: 0031773
2012-12-01 02:05Peter KuemmelAssigned To => Peter Kuemmel
2012-12-01 02:05Peter KuemmelStatusnew => assigned
2012-12-04 07:40Peter KuemmelNote Added: 0031825
2012-12-04 07:40Peter KuemmelStatusassigned => resolved
2012-12-04 07:40Peter KuemmelFixed in Version => CMake 2.8.11
2012-12-04 07:40Peter KuemmelResolutionopen => fixed
2013-05-06 09:32Robert MaynardNote Added: 0032982
2013-05-06 09:32Robert MaynardStatusresolved => closed

Notes
(0031721)
Mathias Gaunard   
2012-11-26 19:18   
I'd gladly contribute a fix, but I'm not sure what the best way to deal with this would be.
Any pointer welcome.
(0031773)
Mathias Gaunard   
2012-11-29 21:50   
Suggested fix here: https://github.com/Kitware/CMake/pull/28 [^]
(0031825)
Peter Kuemmel   
2012-12-04 07:40   
patch is in next
(0032982)
Robert Maynard   
2013-05-06 09:32   
Closing resolved issues that have not been updated in more than 4 months.