[CMake] windows paths...

Phil Pellouchoud Phil at slacker.com
Mon May 12 09:37:20 EDT 2008


doesn't work:

S:\software\fubar\build>type ..\CMakeLists.txt

FILE( TO_CMAKE_PATH GLOB "S:\software\data\profiles.xml" )
FILE( TO_CMAKE_PATH GLOB S:\software\data\profiles.xml )



S:\software\fubar\build>cmake ..
CMake Error: Invalid escape sequence \s
Syntax error in cmake code at
S:/software/fubar/CMakeLists.txt:2:
syntax error, unexpected cal_ERROR, expecting $end (4), when parsing string "S:\software\data\profiles.xml"
CMake Error: Invalid escape sequence \s
Syntax error in cmake code at
S:/software/fubar/CMakeLists.txt:3:
syntax error, unexpected cal_ERROR, expecting $end (4), when parsing string "S:\software\data\profiles.xml"
-- Configuring done

S:\software\fubar\build>cmake --version
cmake version 2.4-patch 8

S:\software\fubar\build>

Also, I need it for commands other than file; like "ADD_SUBDIRECTORY()".

-phil


-----Original Message-----
From: cmake-bounces at cmake.org on behalf of Alexander Neundorf
Sent: Mon 5/12/2008 1:49 AM
To: cmake at cmake.org
Subject: Re: [CMake] windows paths...
 
On Monday 12 May 2008, Phil Pellouchoud wrote:
> hi all,
>
> this is driving me a bit crazy and I'm sure someone on here has encountered
> this before.
>
> our build system is based on environment variables.
>
> the paths in the environment variables looks something like this:
> S:\software\...
>
> When I feed that into cmake, I get errors like:
> syntax error, unexpected cal_ERROR, ..... when parsing string
> "S:\software..."
>
> and "CMake Error: Invalid escape sequence \s"
>
> So, there must be a good way around this.  I think my options are:

file(TO_CMAKE_PATH ...) should do what you want.

Alex
_______________________________________________
CMake mailing list
CMake at cmake.org
http://www.cmake.org/mailman/listinfo/cmake

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20080512/abc816aa/attachment-0001.htm>


More information about the CMake mailing list