[CMake] CMake still broken post-2.8.1

Phil Smith phil at voltage.com
Thu Oct 27 11:05:18 EDT 2011


Yeah, I know everyone thinks out-of-source builds are better, but we have peculiar requirements related to packaging up the object decks and the like that really make out-of-source builds unappealing. We've been doing this for almost 4 years, so we're pretty happy with it (other than this new issue).

I delete CMakeCache.txt and rm -rf CMakeFiles, re-cmake, make, and it calls Regina with no operands. Is there anything else I need to clean up?

There are no FIND_anythings in the CMakeLists.

Yes, we're using assembler as well. ASMIT.BAT is simple:
@echo off
rexx.exe cc.rex dasm.exe %*

That works because dasm doesn't take parameters in the var=value format.

I've attached the CMakeLists.txt.

...phsiii
-----Original Message-----
From: Eric Noulard [mailto:eric.noulard at gmail.com] 
Sent: Thursday, October 27, 2011 10:23 AM
To: Phil Smith; CMake ML
Subject: Re: [CMake] CMake still broken post-2.8.1

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
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CMakeLists.txt
URL: <http://www.cmake.org/pipermail/cmake/attachments/20111027/929b0096/attachment-0001.txt>


More information about the CMake mailing list