[CMake] FW: cmake newbie questions

Phil Smith phil at voltage.com
Thu Jul 31 14:24:03 EDT 2008


When you say "the executable", I assume you mean the object code?  Note that this is being compiled for a System z mainframe, so the object won't look much like anything you've seen before.  I can send it, but is that going to help?


I now understand the second problem.  The issue is that System z is an EBCDIC machine, so the literal generated by the C compile is, by default, EBCDIC. So the regexp looking for "INFO:sizeof" doesn't find it.

Fortunately, the compiler has an option, -fasciiout, that forces such literals to ASCII.  I've confirmed this by manually compiling the CheckTypeSizeC.c file.

So: how do I tell cmake that *just for the configuration part*, it needs to add this option to the things it compiles? (Or maybe just in ChecktypeSizeC.cmake?)

...phsiii
-----Original Message-----
From: Alexander Neundorf [mailto:a.neundorf-work at gmx.net]
Sent: Wednesday, July 30, 2008 1:48 PM
To: cmake at cmake.org
Cc: Phil Smith
Subject: Re: [CMake] FW: cmake newbie questions

On Wednesday 30 July 2008, Phil Smith wrote:
> But then it complains that there's no CMakeLists.txt in the directory.
> Anyway, I wasn't clear: the same person isn't likely to be doing z/OS and
> Windows on the same machine.  But since the same CMakeLists.txt is to be
> used, I didn't want to hard-code anything in there.  I've changed to -G --
> somehow I missed that before (I did look, honest!).
>
> The Dignus C compiler defines __SYSC__ to 1, so I added:
>
> #elif defined(__SYSC__)
> # define COMPILER_ID "Dignus"
>
> to CMakeCCompilerId.c.in, but it made no difference.

It should. It has also to be done in CMakeCXXCompilerId.cpp.in.
Please try to compiler the file CMakeCCompilerId.c.in manually (and edit it
before that appropriately, I think you can just remove the last line with the
CMAKE_C_COMPILER_ID_PLATFORM_CONTENT. If it builds, please send me the
executable.

Alex

> So I added:
>
> INCLUDE (CMakeForceCompiler)
> CMAKE_FORCE_C_COMPILER   (cc.bat Dignus)
> CMAKE_FORCE_CXX_COMPILER (cxx.bat Dignus)
>
> to my toolchain file, and that fixes both the whines about the C compiler
> ID and the copy errors (I'm sure of this because if I comment those 3 lines
> out again, both the whines and the copy errors are back).
>
> I then looked at the various platform files, and concluded that at this
> point, all I knew to try was:
>
> INCLUDE(Platform/UnixPaths)
> (in ZOS.cmake).
>
> With those changes, it looks like it's working:
>
> ------------------
> del CMakeCache.txt
> zcmake
> -- Looking for sys/types.h
> -- Looking for sys/types.h - not found
> -- Looking for stdint.h
> -- Looking for stdint.h - not found
> -- Looking for stddef.h
> -- Looking for stddef.h - not found
> -- Check size of unsigned long long
> -- Check size of unsigned long long - failed
> -- Check size of unsigned long
> -- Check size of unsigned long - failed
> -- Check size of unsigned int
> -- Check size of unsigned int - failed
> -- Check size of unsigned short
> -- Check size of unsigned short - failed
> -- Check size of long long
> -- Check size of long long - failed
> -- Configuring done
> -- Generating done
> -- Build files have been written to: C:/Documents and
> Settings/Voltage/svn/Toolkit/trunk/vtk-core ------------------
>
> Now, I'm sort of inclined to declare victory for now.  But should I?

No, not really.
I suspect they are all the same error. CMake tries to find a string in the
created executable, and I'd say it just doesn't find it (in all cases).
What format do these executables have ?

Alex


More information about the CMake mailing list