[CMake] CMake still broken post-2.8.1

Eric Noulard eric.noulard at gmail.com
Thu Oct 27 10:22:46 EDT 2011


Narrowing down the cc list, everybody should be subscribed to the list..

2011/10/27 Phil Smith <phil at voltage.com>:
> Toolchain.

You lack some var definitions in your toolchain:
see
http://www.cmake.org/Wiki/CMake_Cross_Compiling#The_toolchain_file

# where is the target environment
SET(CMAKE_FIND_ROOT_PATH  /home/alex/src/ecos/install )

# search for programs in the build host directories
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# for libraries and headers in the target directories
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

aren't you using some find_path or find_package in your CMakeLists.txt ?

> Command line:
>
> cmake -DCMAKE_TOOLCHAIN_FILE:string="%~dp0\zosport.cmake" -G"Unix Makefiles" .\

You seem to be doing in-source build, are you sure you did get rid of
CMake generated files
(CMakeCache.txt, CMakeFiles etc...) between two trials?

Using out-of-source build should makes it easier to start from
pristine source tree:
http://www.cmake.org/Wiki/CMake_FAQ#Out-of-source_build_trees

>
> But Hendrik asked:
> Shouldn't this be
>   SET(CMAKE_C_FLAGS_INIT "cc.rex dcc.exe")
>
> and that helped: I get past CMAKE. But then MAKE invokes Regina with no operands. I tried adding another SET(CMAKE_C_FLAGS "cc.rex dcc.exe") but that didn't help. In CMakeCache.txt I see:for a
>
> CMAKE_C_COMPILER:FILEPATH=C:/Program Files/Regina/regina.exe
> and
> CMAKE_C_COMPILER_WITH_PATH:FILEPATH=C:/Program Files/Regina/regina.exe
>
> and
> CMAKE_C_FLAGS:STRING= cc.rex dcc.exe
>
> So I'm confused??
>
> But we're making progress!

You seem to be using assembler as well:

> -- Found assembler: C:/SVN/Dignus/asmit.bat
> -- Check for working C compiler: C:/Program Files/Regina/regina.exe

May be you can send us your main CMakeLists.txt?
I do not know how Assembler and C support interact when cross-compiling
Alex any advice on that?


--
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org


More information about the CMake mailing list