[CMake] Announcing CMake BASIS, a set of CMake based project interoperability and automation tools

Stephen Kelly steveire at gmail.com
Fri Jan 24 07:49:11 EST 2014


Roger Leigh wrote:

> On Thu, Jan 23, 2014 at 10:40:54AM +0100, Stephen Kelly wrote:
>> Andreas Schuh wrote:
>> 
>> > On a side note, just today a co-worker asked me why the compiler cannot
>> > find the header files when they were provided as additional arguments
>> > to the add_executable command. Indeed this was a reasonable assumption,
>> > I think. Why the need for an additional include_directories when I
>> > already specified where the header files are located ? This is not
>> > something BASIS is taking care of yet either, but would certainly be
>> > one of the things I would consider adding.
>> 
>> This is the kind of concrete feedback *about cmake* that I'm looking for
>> in this discussion. It's self contained, refers to existing cmake
>> functionality, it's easy to imagine the 'user story' and what the user
>> code would look like etc.
>> 
>> I don't have any comment about the viability of adding such functionality
>> to cmake add_* commands though.
> 
> I'm not sure this can ever be viable because it makes assumptions that are
> guaranteed to break for different use cases.
> 
> If I add a header, cmake can have no knowledge of how the sources use the
> header.  Is it an absolute or relative include?  Does the relative include
> also include a path?

Exactly.

> I think the general sentiment that having add_executable remove a
> redundant
> include_directories statement is a good one.  I'm just unconvinced that
> this is doable in practice.

My thoughts exactly.

Thanks,

Steve.




More information about the CMake mailing list