Commit Graph

18 Commits

Author SHA1 Message Date
Gregor Jasny 5790aca4ad target_include_directories: Support relative SYSTEM include dirs (#15464) 2015-08-11 08:53:00 -04:00
Stephen Kelly c7b39d06f9 cmMakefile: Split accessors for include directories and origins. 2015-07-22 20:25:47 +02:00
Stephen Kelly 32b8f03acc cmMakefile: Port users of GetStart* methods to new names. 2015-04-21 00:15:20 +02:00
Brad King dd6c596c12 Merge topic 'join-algorithm'
55a73e6b Use the cmJoin algorithm where possible.
8dc8d756 cmStandardIncludes: Add a join algorithm for string containers.
b5813cee cmInstallCommand: Remove unused variable.
2015-01-12 09:41:02 -05:00
Stephen Kelly 931e055d8c Port all cmOStringStream to std::ostringstream.
All compilers hosting CMake support the std class.
2015-01-11 17:06:03 +01:00
Stephen Kelly 55a73e6b1f Use the cmJoin algorithm where possible. 2015-01-08 22:28:18 +01:00
Ben Boeckel d46c650d67 cmMakefile: return a backtrace
This allows backtraces to be fully controlled by the makefile rather
than externally (and makes changing how they are manipulated easier).
2014-06-05 12:44:04 -04:00
Stephen Kelly 4e6ca50445 cmTargetPropCommandBase: Change the interface to return bool.
This is needed for the target_compile_features command, which
may fail at configure time if an invalid feature is specified.
2014-04-07 18:11:18 +02:00
Stephen Kelly 907c09cd31 include_directory: Add missing include.
The cmGeneratorExpression is used here, but the header for it is not
in the include heirarchy.  This would be a compile error if the file
were compiled as a standalone translation unit, but it is instead
used in a mini-unity-build by inclusion in cmCommands.cxx. The header
for cmGeneratorExpression happens to be included first, so the
compilation works fine.

IDEs do not know this however, and flag the use as an error.
2014-02-17 11:08:58 +01:00
Stephen Kelly 38afc82e76 target_include_directories: Allow relative path with genex
Treat paths which are relative and which contain a generator
expression which is not at the beginning as relative to the
source directory.

This matches the behavior of paths which are relative but contain
no generator expression at all.

Previously this would generate a relative path with the IMPORTED
target on export(), which would be a reported as a non-existent
path on import. If used directly in the buildsystem, it would be
reported as a relative path, which is also an error. There is no
need for a policy in this case.
2013-11-26 10:30:18 +01:00
Stephen Kelly 9cf3547e1c Add the INTERFACE_SYSTEM_INCLUDE_DIRECTORIES target property.
Unlike other target properties, this does not have a corresponding
non-INTERFACE variant.

This allows propagation of system attribute on include directories
from link dependents.
2013-07-16 13:44:57 -04:00
Stephen Kelly 1925cffa08 Add a SYSTEM parameter to target_include_directories (#14180)
This is similar to the include_directories(SYSTEM) signature
in that it allows telling the compiler to ignore warnings from
such headers.
2013-07-02 16:40:03 +02:00
Stephen Kelly 5b88504f65 Rename the IncludeDirectoriesEntry to be more generic. 2013-02-12 10:39:35 +01:00
Stephen Kelly 92e98dd909 Deduplicate the isGeneratorExpression method.
This API seems like the most appropriate.
2013-02-07 16:21:08 +01:00
Stephen Kelly 7bf490e9bb Make subclasses responsible for joining content.
This way we can add handling of relative/absolute paths and of
-D in compile definitions.
2013-01-29 19:34:04 +01:00
Stephen Kelly f6b16d4b06 Don't allow targets args in the new target commands. 2013-01-29 18:44:54 +01:00
Stephen Kelly b98d14d400 Disallow porcelain to populate includes and defines of IMPORTED targets.
With similar reasoning to the parent commit, as downstreams, we can't
determine what $<CONFIG> generator expressions would be appropriate.

Upstream would have populated the INTERFACE_INCLUDE_DIRECTORIES with
config-specific generator expressions, possibly appropriate for
their DEBUG_CONFIGURATIONS. In theory, if we would add include
directories for a DEBUG intent, we would have to match the upstream
configurations for that.

Rather than attempting to discover the appropriate configurations
at this time, simplify the feature instead. The use of IMPORTED targets
with these commands could still be added in the future if targets
would export their DEBUG_CONFIGURATIONS somehow.
2013-01-21 12:32:46 +01:00
Stephen Kelly 8a37ebec78 Add the target_include_directories command.
This is a convenience API to populate the corresponding properties.
2013-01-10 09:46:57 -05:00