[CMake] CMake still broken post-2.8.1

Phil Smith phil at voltage.com
Mon Oct 24 18:38:02 EDT 2011


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? 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")

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...

-----Original Message-----
From: cmake-bounces at cmake.org [mailto:cmake-bounces at cmake.org] On Behalf Of Bill Hoffman
Sent: Monday, October 24, 2011 6:08 PM
To: cmake at cmake.org
Subject: Re: [CMake] CMake still broken post-2.8.1

On 10/24/2011 5:42 PM, Phil Smith wrote:
> Attached. ZTOOL is a wrapper for CMake, because we're cross-compiling
> with a two-stage compiler and have various other requirements.
>
> We do a bunch of CMAKE -E commands before the cmake
> -DCMAKE_TOOLCHAIN_FILE:string="%~dp0\zosport.cmake" -G"Unix Makefiles" .\
>

So, right at the end it is doing this:


  )
C:/Program Files (x86)/CMake 
2.8/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake(95): 
IF(COMMAND EXECUTE_PROCESS )
C:/Program Files (x86)/CMake 
2.8/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake(96): 
EXECUTE_PROCESS(COMMAND ${CMAKE_${lang}_COMPILER} ${CMAKE_${lang}_
COMPILER_ID_ARG1} ${CMAKE_${lang}_COMPILER_ID_FLAGS_LIST} ${testflags} 
${src} WORKING_DIRECTORY ${CMAKE_${lang}_COMPILER_ID_DIR} 
OUTPUT_VARIABLE CMAKE_${lang}_C
OMPILER_ID_OUTPUT ERROR_VARIABLE CMAKE_${lang}_COMPILER_ID_OUTPUT 
RESULT_VARIABLE CMAKE_${lang}_COMPILER_ID_RESULT )
^CTerminate batch job (Y/N)?
^C*** 'CMake' phase ended at Mon 10/24/2011 17:38:47.64 with errorlevel 
-1073741510 **


Cmake is running the compiler you gave it.  Looks like:
regina.exe.


SET(CMAKE_C_COMPILER regina.exe cc.rex dcc.exe )
c:/SVN/Dignus/zosport.cmake(9):  SET(CMAKE_CXX_COMPILER regina.exe 
cc.rex dcxx.exe )

So, regina.exe is hanging forever.

To debug more, you could print out the exact command line CMake is 
trying to run.  Edit C:/Program Files (x86)/CMake 
2.8/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake on line 96, 
and add a new line that does this:

message("${CMAKE_${lang}_COMPILER} ${CMAKE_${lang}_
COMPILER_ID_ARG1} ${CMAKE_${lang}_COMPILER_ID_FLAGS_LIST} ${testflags} 
${src}"


> Hope this makes some sense...
>
It does....  Add the above print, and try again.  Also, maybe run the 
command that CMake is running by hand and see if it hangs.  Since this 
is a toolchain file, you should be able to short circut the test 
altogether and set the information CMake is trying to figure out.


-Bill
--

Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


More information about the CMake mailing list