[CMake] CMake still broken post-2.8.1

Brad King brad.king at kitware.com
Wed Jan 25 14:39:38 EST 2012


On 1/25/2012 1:50 PM, Phil Smith wrote:
> Ok, that *maybe* gets me further. CMakeDetermineASM_DIGNUSCompiler.cmake (in Modules\) is:
>
> SET(ASM_DIALECT _DIGNUS)
> SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT "asmit.bat")
> INCLUDE(CMakeDetermineASMCompiler)
> SET(ASM_DIALECT)
>
> and that gets invoked several times, with:
>
> dasm.exe --version
> dasm.exe -h
> dasm.exe -qversion
> dasm.exe -V
>
> ...none of which work. Maybe I need to force something for the assembler?
 > Or should asmit.bat just return 0 for any of those?

Assembly support was very immature as of 2.8.0 and has been modified
since then.  I've heard complaints that some incompatibilities were
introduced but never worked with it myself.

Alex?

> Oh, I did also try the recommended lines, both as listed and as:
>
>     SET(CMAKE_C_COMPILER_ID_RUN 1)
>     SET(CMAKE_C_PLATFORM_ID "DIGNUS")
>     SET(CMAKE_C_COMPILER_ID "DIGNUS")
>     SET(CMAKE_CXX_COMPILER_ID_RUN 1)
>     SET(CMAKE_CXX_PLATFORM_ID "DIGNUS")
>     SET(CMAKE_CXX_COMPILER_ID "DIGNUS"
> I'm not sure "DIGNUS" was the right ID to try, but it didn't seem to make any difference.

It won't make a difference unless CMake has a matching Platform/*
and/or Compiler/* information module available in CMAKE_MODULE_PATH.
If it works without that then don't worry about it.

> The problem here, of course, is that I don't understand what it's *trying* to do

The relevant process is documented here:

   http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmGlobalGenerator.cxx;hb=v2.8.6#l152

During "CMakeDetermine(LANG)Compiler" CMake figures out what compiler
the user is asking it to choose for a LANGuage (via either the
environment or a toolchain file).  Then it runs that compiler in
the CMakeDetermineCompilerId module to detect the compiler vendor.
 From that name the CMake(LANG)Information.cmake step loads matching
Platform/* and Compiler/* modules that contain information about how
to generate build rules for that compiler.

-Brad


More information about the CMake mailing list