[CMake] CHECK_C_SOURCE_COMPILES and include_directories
Florian Weimer
fw at deneb.enyo.de
Mon May 11 03:12:15 EDT 2015
* Rolf Eike Beer:
>> > CMAKE_REQUIRED_INCLUDES = list of include directories
>>
>> I saw that, but I thought this happens behind the scenes. Do I have
>> to set this variable in addition to the include_directories directive?
>
> Yes, include_directories() only affects target, i.e. add_executable
> and friends, but not macros like CHECK_C_SOURCE_COMPILES. Those will
> explicitely look at those variables.
Thanks, this does indeed.
(I'm not sure if my initial confusion is specific to me, or if the
documentation could be improved. But I don't really see where to put
this information so that it is easily discovered.)
More information about the CMake
mailing list