[CMake] Backward slashes in Win32

Christian Ehrlicher Ch.Ehrlicher at gmx.de
Thu May 3 02:52:32 EDT 2007


Von: Pau Garcia i Quiles <pgquiles at elpauer.org>
> Hello,
> 
> Is it possible to get paths with backward slashes instead of forward  
> slashes when in Win32?
> 
> I mean, I am getting paths like c:/project/dir/file.cpp instead of  
> c:\project\dir\file.cpp, which are confusing cmd.exe when I invoke it  
> to run some command. For now I am using a STRING(REGEX REPLACE "/"  
> "\\\\" VAR_WIN32 VAR) but it's annoying.
> 
> (cmake 2.4.6 here)
> 
>From the cmake documentation:

FILE(TO_NATIVE_PATH path result)
TO_NATIVE_PATH works just like TO_CMAKE_PATH, but will convert from a cmake style path into the native path style \ for windows and / for UNIX.

HTH
Christian
-- 
"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail


More information about the CMake mailing list