diff options
author | Brad King <brad.king@kitware.com> | 2021-02-24 13:42:15 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-02-25 18:24:45 (GMT) |
commit | a133a583d484028f8b03bd791ebea8ba0cf96b84 (patch) | |
tree | 0674b75f633c0785f8b095b3606f84a6e87ba103 /Source/cmGlobalXCodeGenerator.cxx | |
parent | c99db7153337865861ccb79c8f855d4d9f3539fc (diff) | |
download | CMake-a133a583d484028f8b03bd791ebea8ba0cf96b84.zip CMake-a133a583d484028f8b03bd791ebea8ba0cf96b84.tar.gz CMake-a133a583d484028f8b03bd791ebea8ba0cf96b84.tar.bz2 |
cmLocalGenerator: Clarify GetIncludeFlags signature
Make the `config` argument non-optional so all callers must be explicit.
Convert the path style argument to an enumeration to make its role clear
at call sites.
The path style argument is implemented by `ConvertToIncludeReference`,
which was introduced with the Ninja generator by commit 5b114c9bee
(Introduce a cmLocalGenerator::ConvertToIncludeReference function,
2011-09-07, v2.8.7~187^2~4). Its only purpose is to allow the Ninja
generator to use relative paths in `-I` flags. Add a comment explaining
this role.
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 8ecebae..37ef4fc 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -991,7 +991,10 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeSourceFile( includes, genexInterpreter.Evaluate(*cincludes, INCLUDE_DIRECTORIES), *sf); } - lg->AppendFlags(flags, lg->GetIncludeFlags(includes, gtgt, lang, true)); + lg->AppendFlags( + flags, + lg->GetIncludeFlags(includes, gtgt, lang, std::string(), false, + cmLocalGenerator::IncludePathStyle::Absolute)); cmXCodeObject* buildFile = this->CreateXCodeBuildFileFromPath(sf->ResolveFullPath(), gtgt, lang, sf); @@ -2695,7 +2698,8 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt, // GNU assembly files (#16449) for (auto const& language : languages) { std::string includeFlags = this->CurrentLocalGenerator->GetIncludeFlags( - includes, gtgt, language, true, false, configName); + includes, gtgt, language, configName, false, + cmLocalGenerator::IncludePathStyle::Absolute); if (!includeFlags.empty()) { cflags[language] += " " + includeFlags; |