[CMake] Spaces in paths bug

Marcin Gil marcin.gil at gmail.com
Thu Jan 4 10:03:28 EST 2007


Hi!

My source directory looks like this:

ProjectName/
  /00 Bin
  /10 Build
    /Debug
    /Release
  /50 Common
    /SBF

I have CMakeLists.txt

ProjectName/
  CMakeLists.txt:
    PROJECT(ProjectName)
    ADD_SUBDIRECTORY("50 Common")
  /50 Common
    CMakeLists.txt:
      ADD_SUBDIRECTORY(SBF)
    /SBF
      CMakeLists.txt:
        PROJECT(SBF)
        ADD_LIBRARY(SBF SHARED source files)

this should give you an idea about layout.

I am trying to do out-of-source builds in
ProjectName/
  /10 Build
    /Debug

issuing command: cmake -DCMAKE_BUILD_TYPE=Debug -G "NMake Makefiles" ../../

The Makefiles are created ok but when I issue an 'nmake' command in Debug
dir
I get this error:

CMake Error: Cannot open file for write:
Common/SBF/CMakeFiles/SBF.dir"/depend.m
ake.tmp
CMake Error: : System Error: Invalid argument
CMake Error: Cannot open file for write:
Common/SBF/CMakeFiles/SBF.dir"/depend.i
nternal.tmp
CMake Error: : System Error: Invalid argument
CMake Error: Cannot open file for write:
Common/SBF/CMakeFiles/SBF.dir"/depend.m
ake.tmp
CMake Error: : System Error: Invalid argument
CMake Error: Cannot open file for write:
Common/SBF/CMakeFiles/SBF.dir"/depend.i
nternal.tmp
CMake Error: : System Error: Invalid argument
NMAKE : warning U4004: too many rules for target '"50
Common\SBF\CMakeFiles\SBF.
dir"'
NMAKE : warning U4004: too many rules for target '"50
Common\SBF\CMakeFiles\SBF.
dir"'
NMAKE : fatal error U1073: don't know how to make '"50
Common\SBF\CMakeFiles\SBF
.dir\depend"'
Stop.
NMAKE : fatal error U1077: '"c:\program files\microsoft visual studio
8\vc\bin\n
make.exe"' : return code '0x2'

and "50 " is cut out from "50 Common".
Looking into CMakeCache.txt reveals that
SBF_SOURCE_DIR:STATIC=d:/Devel/ProjectName/50 Common/SBF

is not surrounded with ".

How can I solve this?

Thanks,
-Marcin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20070104/e6ee8ea0/attachment.htm


More information about the CMake mailing list