[CMake] CMAKE_COMPILER variable

Michael Enright michael.enright at gmail.com
Mon Jun 9 14:30:20 EDT 2014


On Fri, Jun 6, 2014 at 3:55 PM, Adam <adam707blue at gmail.com> wrote:

> I think the "CMAKE_COMPILER" variable you're referring to is just a custom
> variable passed to your external project, which it uses to build the
> standard variables "CMAKE_C_COMPILER" & "CMAKE_CXX_COMPILER".  This is why
> your not finding anything.
>
> Have a look at these pages
>
> http://www.cmake.org/Wiki/CMake_Cross_Compiling#Setting_up_the_system_and_toolchain
> http://www.cmake.org/Wiki/CMake_Useful_Variables
>
>
The variable in question doesn't appear on either of those pages. It would
be surprising (or worse) if either of those pages had variables that the
two pages I linked did not have. CMAKE_COMPILER also doesn't appear in
/usr/local/share/cmake2.8, the location here of the supporting scripts such
as CheckIncludeFile.cmake. It also does not appear in the library's
CMakeLists.txt or its own supporting CMake scripts. So it looks like a
local typo together with some unexplained mechanism that gets
CMAKE_C_COMPILER to be set for this library after enough build attempts.
Changing the External_Project_Add to use CMAKE_C_COMPILER where
CMAKE_COMPILER had been used has been successful in one build out of one
build attempts.




>
>
> On Sat, Jun 7, 2014 at 6:30 AM, Michael Enright <michael.enright at gmail.com
> > wrote:
>
>> I've got an External_Project_Add in my superbuild that adds a CMake-built
>> library to the build. It attempts to use the CMAKE_COMPILER variable in
>> order to define CMAKE_C_COMPILER for this library's build.
>>
>> This external project's build is flakey. I intend to diagnose this myself
>> so I don't plan to supply a reduction or anything like that, I'm just
>> trying to gather information.
>>
>> To that end, I need an authoritative definition of CMAKE_COMPILER, i.e. I
>> have been searching for a web page where CMAKE_COMPILER is described. Apart
>> from googling I have also just manually reviewed
>> http://www.cmake.org/cmake/help/cmake2.6docs.html
>> and
>> http://www.cmake.org/cmake/help/v2.8.12/cmake.html
>>
>>
>> Neither of those contain the string "CMAKE_COMPILER" except as substrings
>> of other names such as CMAKE_COMPILER_2005.
>>
>> Can anyone provide a link or say anything about this variable?
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20140609/467d9195/attachment.html>


More information about the CMake mailing list