[Cmake] Trouble with / and \

John Biddiscombe jbiddiscombe at skippingmouse.co.uk
Wed Jan 29 17:06:10 EST 2003


Andy,

Thanks, Just what I needed

JB

----- Original Message -----
From: "Andy Cedilnik" <andy.cedilnik at kitware.com>
To: "John Biddiscombe" <john.biddiscombe at mirada-solutions.com>
Cc: "CMake" <cmake at public.kitware.com>
Sent: Tuesday, January 28, 2003 4:06 PM
Subject: Re: [Cmake] Trouble with / and \


> 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?
>
>
> _______________________________________________
> Cmake mailing list
> Cmake at public.kitware.com
> http://public.kitware.com/mailman/listinfo/cmake
>





More information about the CMake mailing list