[CMake] CMake still broken post-2.8.1

Phil Smith phil at voltage.com
Thu Oct 27 08:40:24 EDT 2011


Hmm. My zosport.cmake is now (comments/blank lines removed):

SET(CMAKE_SYSTEM_NAME "IBM_ZOS")
SET(CMAKE_C_COMPILER_ID_RUN 1)
SET(CMAKE_C_PLATFORM_ID "MyPlatform")
SET(CMAKE_C_COMPILER_ID "MyCompiler")
SET(CMAKE_C_COMPILER   "regina")
SET(CMAKE_C_FLAGS "cc.rex dcc.exe")
SET(CMAKE_C_CREATE_STATIC_LIBRARY "DAR -rv <TARGET> <OBJECTS>")
SET(CMAKE_C_LINK_EXECUTABLE   "plink.exe \"-S$ENV{DIGNUS_PROGRAM}/objs_norent/&M\" <OBJECTS> -o <TARGET>")

I get:
-- Found assembler: C:/SVN/Dignus/asmit.bat
-- Check for working C compiler: C:/Program Files/Regina/regina.exe
-- Check for working C compiler: C:/Program Files/Regina/regina.exe -- broken
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE):
  The C compiler "C:/Program Files/Regina/regina.exe" is not able to compile
  a simple test program.

So it looks like it's still trying to run the C compiler?!

...phsiii
-----Original Message-----
From: Bill Hoffman [mailto:bill.hoffman at kitware.com] 
Sent: Wednesday, October 26, 2011 12:43 PM
To: Phil Smith
Cc: a.neundorf-work at gmx.net; cmake at cmake.org; David Cole; Janet Graff; Brad King
Subject: Re: [CMake] CMake still broken post-2.8.1

So, since this is a cross compile situation, there is really no need to 
run the compiler id code.  You should be able to put the following into 
your toolchain file and avoid the compiler id check code altogether:


   SET(CMAKE_C_COMPILER_ID_RUN 1)
   SET(CMAKE_C_PLATFORM_ID "MyPlatform")
   SET(CMAKE_C_COMPILER_ID "MyCompiler")


Does that work, or does it get stuck somewhere else?

-Bill


More information about the CMake mailing list