[CMake] Adding configuration for a new compiler

Brad King brad.king at kitware.com
Wed Apr 16 10:47:01 EDT 2008


Bill Hoffman wrote:
> Hendrik Sattler wrote:
>> Zitat von Alexander Neundorf <a.neundorf-work at gmx.net>:
>>> This is the ABI test. It is not special for cross compiling, but it
>>> would be
>>> nice if it would work.
>>> We need to see the error message.
>>
>> I found out why: yet another bug in the compiler front-end. It doesn't
>> copy "" to the cpp30 call, thus a space in the path breaks it. :-(
>> On Windows, CMake installs to a path with spaces by default:
>>   "C:\Program Files\Cmake 2.6"
>>
>> Not actually a CMake problem, just an extremely buggy compiler
>> frontend. I just note for user of that one to install cmake to
>> C:\local instead. The only work-around I could imagine is to copy over
>> the file before trying to compile it (no path -> no problems).
> 
> Perhaps the abi test should copy the file into the build tree, and then
> run the compiler on that file instead of the one installed by cmake.
> There are other compilers that do not work with spaces.

This approach is already used for the compiler id check.  It was
necessary to support another compiler that by default puts the output
object file next to the source file instead of in the current working
directory.  The difference is that the compiler id check is not a
try_compile but just an execute_process since it is so early in the
configuration process.

-Brad


More information about the CMake mailing list