[CMake] to_cmake_path/to_native_path oddities

Axel Roebel Axel.Roebel at ircam.fr
Wed May 28 13:48:10 EDT 2008


On Wednesday 28 May 2008, Bill Hoffman wrote:
> Axel Roebel wrote:
> >> You may want to
> >> try the Unix Makefile generator and the windows binary of cmake.  The
> >> cygwin cmake really does not work very will with native windows
> >> programs.  It really is meant to work in the cygwin environment with the
> >> cygwin tool chain.  You could add NO_DEFAULT_PATH to your FIND_PATH call
> >> and it would stop cmake from looking in INCLUDE.
> >
> > Unix makefile generator with windows binary was our first trial. How can
> > I set the compiler to use ? icl is not the standard compiler for unix
> > makefiles? Anyway, I doubt that windows cmake will convert pathes to unix
> > style before writing it into the unix makefile. As far as I saw it
> > didn't.
>
> set environment variables CC,CXX, and FC to the compilers you want cmake
> to use before you run cmake, and it should work.

Hi Bill,

Ok I see you mean running the windows binary from the command line.
However,it does not work with unix makefiles. 
It uses windows paths in a unix makefile. 
I don't see in which situation this could be useful.

I get
rec-1320: (build) 334> make
libfft/src/CMakeFiles/fft_static.dir/build.make:53: *** target pattern 
contains no `%'.  Stop.
make[1]: *** [libfft/src/CMakeFiles/fft_static.dir/all] Error 2
make: *** [all] Error 2

The makefile is actually invalid.

> >>> This seems already somewhat buggy tpo me because I would have expected
> >>> that in a unix makefile generator the variable should be automatically
> >>> converted to unix path style.
> >>
> >> The path should be converted before it is actually used if you pass it
> >> to say include_directories.
> >
> > I would like to, but I actually can't in cmake. I think this is a problem
> > of cmake.
>
> What error do you get?

???
I don't get an error, there is simply no function to convert a windows path 
into a unix path. I understand I have to make my own macro.

Thanks,

-- 
Axel Roebel    
IRCAM Analysis/Synthesis Team
Phone: ++33-1-4478 4845 | Fax: ++33-1-4478 1540


More information about the CMake mailing list