[Cmake] Configuration problem in Dart/CMake

Ian Scott ian.m.scott at stud.man.ac.uk
Tue Sep 10 05:50:20 EDT 2002


We have found a problem with CMake/Dart which explains why Builds on windows
are more prone to temporary configuration problems on dashboards.

If (as would be expected) you have installed CMake in
C:\Program Files\CMake
then the CMAKE variable CMAKE_COMMAND will be set to
C:/Program Files/CMake/bin/cmake.exe

When dart uses a CONFIGURE_FILE command on a file containing the following
line

ConfigureCommand: @CMAKE_COMMAND@ @PROJECT_SOURCE_DIR@

It produces the output

ConfigureCommand: C:/Program Files/CMake/bin/cmake.exe
C:/workspace/seng/contsrc

Dart uses this output to set itself up, and attempts to exec
$ConfigureCommand, producing ( and quietly swallowing) an error Can't find
"C:\program"

This problem can be fixed by moving CMake to somewhere without a space in
the path.

However, a proper fix would be useful. For example is it possible to tell
the Configure command to replace any spaces inside a particular macro with
"\ "? Another approach might include forcing cmake to use the 8.3
translation of the path name
C:/PROGRA~1/CMake/bin/cmake.exe
but I don't know how to do this either.

Adding quotes to the outside of the command, i.e.
ConfigureCommand: "@CMAKE_COMMAND@" @PROJECT_SOURCE_DIR@
does not appear to work. The quotes get swallowed by tcl.


Ian.





More information about the CMake mailing list