[cmake-developers] target_include_directories() accepts only absolute paths ?
Brad King
brad.king at kitware.com
Tue Jan 29 09:12:59 EST 2013
On 01/29/2013 04:07 AM, Stephen Kelly wrote:
>> target_include_directories(foo PRIVATE bar/ ./zot)
>
> That wouldn't work. I needed this patch:
>
> http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=aca4916b2c124c6ec198c1f88329379458c93727
>
> for this error:
>
> http://open.cdash.org/testDetails.php?test=173056412&build=2758124
It would work if you took the trailing slash to mean directory but then
stripped it off. I think the point is moot given the other side of this
thread is about to conclude that we shouldn't support target names at all.
>> This would also help in
>> cases where variables contain lists meant for the old add_definitions
>> command which wants -D.
>
> True, but I think moving away from having a compiler-specific syntax to add
> definitions is a good thing.
It's not really compiler-specific, it's just the interface of add_definitions.
The command parses out the -D as syntax and then passes the definition to the
same plumbing as COMPILE_DEFINITIONS. I think this feature could be added to
tcd() to help projects transition use of existing Foo_DEFINITIONS variables
meant for add_definitions. It certainly doesn't belong in the plumbing though.
-Brad
More information about the cmake-developers
mailing list