Re the link command, thanks: SET(CMAKE_C_LINK_EXECUTABLE "c:/progra~1/dignus/linkit.bat -o ./<TARGET> <OBJECTS>") seems to be working much better!
As for the ForceCompiler stuff, I think I understand what you're getting at, but am reluctant to be quite that pure since it's likely to require a bunch more tinkering. For historical reasons, Dignus is really, really unlikely to add any more compilers, and are equally unlikely to support any other hardware platforms. Also for historical reasons, the various IBM OSes for z are interoperable, so the OS doesn't seem relevant. I hate everything I've just written -- I believe strongly in the purity of such things, having been burned far too often by folks NOT bothering -- but find myself unwilling to make the investment this time. ...phsiii -----Original Message----- From: Alexander Neundorf [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 05, 2008 3:57 PM To: cmake@cmake.org Cc: Phil Smith Subject: Re: [CMake] Cross-compiling for z/OS -- linker question Hi, On Tuesday 05 August 2008, Phil Smith wrote: > Next issue: linking. I have a toolchain file now that looks like this: > > ------------------------------------------------------------ > # Tell CMAKE the target system name > SET(CMAKE_SYSTEM_NAME "ZOS") > > # Specify the cross-compilers > SET(CMAKE_C_COMPILER "c:/progra~1/dignus/cc.bat") > SET(CMAKE_CXX_COMPILER "c:/progra~1/dignus/cxx.bat") > > # Linker > SET(CMAKE_CXX_LINK_EXECUTABLE "c:/progra~1/dignus/linkit.bat") > SET(CMAKE_C_LINK_EXECUTABLE "c:/progra~1/dignus/linkit.bat") These two variables should contain the full command to link an executable, not only the actual tool, see e.g. Modules/Platform/eCos.cmake for an example with a quite custom link command or Modules/CMakeCInformation.cmake for the default settings > INCLUDE (CMakeForceCompiler) > CMAKE_FORCE_C_COMPILER (c:/progra~1/dignus/cc.bat Dignus) > CMAKE_FORCE_CXX_COMPILER (c:/progra~1/dignus/cxx.bat Dignus) > ------------------------------------------------------------ > > (I'm actually likely to change all "ZOS" to "DIGNUS", since it's really not > specific to z/OS, but rather to System z -- but that's for later.) Well, the initial tests for the compiler should work without the CMakeForceCompiler stuff. If this works, then CMakeC[XX]CompilerId.c.in cmake should be able to detect that it's the Dignus compiler, and set CMAKE_C_COMPILER_ID to "Dignus". Once this is works, it then tries to load Modules/Platform/ZOS-Dignus-C.cmake (and ZOS-Dignus-CXX.cmake). These files should then contain the settings which are specific for that combination of operating system, and compiler. E.g CMAKE_C_LINK_EXECUTABLE and maybe more. > CMAKE calls cc.bat correctly for CheckInclude and CheckTypeSizeC. But then > it calls linkit.bat with NO operands -- so linkit has no idea what it's > supposed to linkedit! What am I missing? See above. Alex _______________________________________________ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake