[Cmake] Trouble with / and \
Andy Cedilnik
andy.cedilnik at kitware.com
Tue Jan 28 11:06:35 EST 2003
Hi John,
If everything else fails, you can always use
IF(WIN32)
STRING(REGEX REPLACE "/" "\\" BINDIR ${JavaR2_BINARY_DIR})
ELSE(WIN32)
SET(BINDIR ${JavaR2_BINARY_DIR})
ENDIF(WIN32)
(Cmake 1.6 of course)
Andy
On Tue, 2003-01-28 at 10:35, John Biddiscombe wrote:
> I’m setting up some batch files which perform builds and are
> automatically configured from CMake using the configure_file command
> like thus…
>
>
>
> CONFIGURE_FILE(
>
> "${JavaR2_SOURCE_DIR}/Build_Test/Run_Tests.bat.in"
>
> "${JavaR2_BINARY_DIR}/Build_Test/Run_Tests.bat"
>
> )
>
>
>
> all is well except that for the batch files to run properly, they have
> at the start
>
> cd /d "@JavaR2_BINARY_DIR@" (Note the quotes in this line which are
> intentional)
>
> but the expanded JavaR2_BINARY_DIR path always comes out like this…
>
>
>
> C:/CMakebuild/JavaR2
>
>
>
> And windows fails (even when it’s quoted as above) to change to
>
>
>
> C:\CMakebuild\JavaR2
>
>
>
> Is there a way of telling CMake to output the windows style path?
More information about the CMake
mailing list