[CMake] CMake still broken post-2.8.1

Eric Noulard eric.noulard at gmail.com
Tue Oct 25 05:00:56 EDT 2011


Sorry for previous unfinished e-mail.

2011/10/25 Phil Smith <phil at voltage.com>:
> Ah, ok. With 2.8.1:
>
> C:/Program Files/Regina/regina.exe cc.rex dcc.exe   CMakeCCompilerId.c
>
> With 2.8.6:
> C:/Program Files/Regina/regina.exe cc.rex;dcc.exe   CMakeCCompilerId.c
>
> Note the semicolon; where'd it come from?

This is clearly a change of behavior but from my point of view it is a change
of "unsupported and/or unexpected" behaviour.


> It's not in the toolchain file:
> ----------------------------------------
> # This is a CMake Toolchain file, required for cross-compiling using
> # the Dignus cross-compilers on Windows, compiling for z/OS.
>
> # Tell CMAKE the target system name
> SET(CMAKE_SYSTEM_NAME "IBM_ZOS")
>
> # Specify the cross-compilers
> SET(CMAKE_C_COMPILER   "regina.exe" "cc.rex dcc.exe")
> SET(CMAKE_CXX_COMPILER "regina.exe" "cc.rex dcxx.exe")

I think CMAKE_[C|CXX]_COMPILER vars are supposed to contain
a command not command + list of args.
If I'm wrong please someone (Alex, Bill,...) just tell me.

Doesn't
SET(CMAKE_C_COMPILER   "regina.exe cc.rex dcc.exe")
SET(CMAKE_CXX_COMPILER "regina.exe cc.rex dcxx.exe")
works for you?

If not I would say that you may either create a wrapper script which
make the triplet
a single command or may be you should:
SET(CMAKE_C_COMPILER   "regina.exe")
SET(CMAKE_C_FLAGS "cc.rex dcc.exe"

> SET(CMAKE_C_CREATE_STATIC_LIBRARY "DAR -rv <TARGET> <OBJECTS>")
>
> SET(CMAKE_CXX_LINK_EXECUTABLE "plink.exe \"-S$ENV{DIGNUS_PROGRAM}/objs_norent/&M\" <OBJECTS> -o <TARGET>")
> SET(CMAKE_C_LINK_EXECUTABLE   "plink.exe \"-S$ENV{DIGNUS_PROGRAM}/objs_norent/&M\" <OBJECTS> -o <TARGET>")
> ----------------------------------------
>
> BTW, Regina is a Rexx processor -- it's running a script called cc.rex. If I invoke it directly:
>
> C:\SVN\Dignus>"c:\Program Files\Regina\regina.exe"  cc.rex;dcc.exe   CMakeCCompilerId.c
> Error 3 running "cc.rex;dcc.exe": Failure during initialization
> Error 3.1: Failure during initialization: Program was not found
>
> ...which is what I'd expect. But the semicolon is still the problem here...


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


More information about the CMake mailing list