diff options
author | Brad King <brad.king@kitware.com> | 2016-05-24 15:39:25 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-05-25 13:30:31 (GMT) |
commit | c13408279f035c8261b530e26040cf4b8f01fdab (patch) | |
tree | 0532f1a061fe568a53ef5c024c8fca84451bfd8d /Source/cmGeneratorTarget.cxx | |
parent | 4419909756751170d6fd4248b205c96767220dee (diff) | |
download | CMake-c13408279f035c8261b530e26040cf4b8f01fdab.zip CMake-c13408279f035c8261b530e26040cf4b8f01fdab.tar.gz CMake-c13408279f035c8261b530e26040cf4b8f01fdab.tar.bz2 |
Add a variable to specify language-wide system include directories
Create a `CMAKE_<LANG>_STANDARD_INCLUDE_DIRECTORIES` variable to specify
system include directories for for `<LANG>` compiler command lines.
This plays a role for include directories as the existing
`CMAKE_<LANG>_STANDARD_LIBRARIES` variable does for link libraries.
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 31fff9f..8859172 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -2415,6 +2415,18 @@ std::vector<std::string> cmGeneratorTarget::GetIncludeDirectories( cmDeleteAll(linkInterfaceIncludeDirectoriesEntries); + // Add standard include directories for this language. + std::string const standardIncludesVar = + "CMAKE_" + lang + "_STANDARD_INCLUDE_DIRECTORIES"; + std::string const standardIncludes = + this->Makefile->GetSafeDefinition(standardIncludesVar); + std::vector<std::string>::size_type const before = includes.size(); + cmSystemTools::ExpandListArgument(standardIncludes, includes); + for (std::vector<std::string>::iterator i = includes.begin() + before; + i != includes.end(); ++i) { + cmSystemTools::ConvertToUnixSlashes(*i); + } + return includes; } |