[CMake] Fwd: Cross-compiling a static library (CMake 2.8.3)

Emmanuel Blot eblot.ml at gmail.com
Mon Jan 10 13:28:48 EST 2011


Oops, I forgot to post to the ML

---------- Forwarded message ----------
From: Emmanuel Blot <eblot.ml at gmail.com>
Date: 2011/1/10
Subject: Re: [CMake] Cross-compiling a static library (CMake 2.8.3)
To: Bjørn Forsman <bjorn.forsman at gmail.com>


> I haven't used that one before. The docs say it should be used
> when CMake is not able to detect the compiler ID. Is that the case here?
> Have you tried "set(CMAKE_C_COMPILER arm-linux-gcc)"?

I will try.
This is a recurrent issue with CMake (I'm not blaming anyone here, but
I faced similar issues many times): it evolves (which is great !), but
it is quite common to encounter some kind of regressions even with
"patch level" releases. As the exact version of cmake varies from one
machine to another, it is really hard to write CMakeFiles.txt and keep
them in sync to keep them working while CMake evolves. At least with
cross-compilation projects.

I can't remember the reason for the "FORCE_C_COMPILER", so it may not
been required or even recommended anymore. If I can get rid of it, I
will.

>> Maybe the version number is the source of the trouble ?
> The docs say that the signature is
> CMAKE_FORCE_C_COMPILER(<compiler> <compiler-id>)
> so maybe something bad happens when you give it that extra
> argument "4"? Try without "4"?

Ok. I don't know why I added '4', maybe it's a left over syntax from
early CMake versions, or I copied a wrong sample file somewhere. It
has been there for 2 or 3 years though ;-).

Thanks a lot for your help,
Manu


More information about the CMake mailing list