summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/cmFileAPICodemodel.cxx2
-rw-r--r--Source/cmJsonObjects.cxx2
-rw-r--r--Source/cmLocalGenerator.cxx45
-rw-r--r--Source/cmLocalGenerator.h36
-rw-r--r--Source/cmQtAutoGenInitializer.cxx4
5 files changed, 63 insertions, 26 deletions
diff --git a/Source/cmFileAPICodemodel.cxx b/Source/cmFileAPICodemodel.cxx
index 3363c9b..4597d4f 100644
--- a/Source/cmFileAPICodemodel.cxx
+++ b/Source/cmFileAPICodemodel.cxx
@@ -727,7 +727,7 @@ void Target::ProcessLanguage(std::string const& lang)
lg->GetTargetDefines(this->GT, this->Config, lang);
cd.SetDefines(defines);
std::vector<BT<std::string>> includePathList =
- lg->GetIncludeDirectories(this->GT, lang, this->Config, true);
+ lg->GetIncludeDirectories(this->GT, lang, this->Config);
for (BT<std::string> const& i : includePathList) {
cd.Includes.emplace_back(
i, this->GT->IsSystemIncludeDirectory(i.Value, this->Config, lang));
diff --git a/Source/cmJsonObjects.cxx b/Source/cmJsonObjects.cxx
index 135fd25..4b6b4d5 100644
--- a/Source/cmJsonObjects.cxx
+++ b/Source/cmJsonObjects.cxx
@@ -578,7 +578,7 @@ static Json::Value DumpTarget(cmGeneratorTarget* target,
lg->GetTargetDefines(target, config, lang, defines);
ld.SetDefines(defines);
std::vector<std::string> includePathList;
- lg->GetIncludeDirectories(includePathList, target, lang, config, true);
+ lg->GetIncludeDirectories(includePathList, target, lang, config);
for (std::string const& i : includePathList) {
ld.IncludePathList.emplace_back(
i, target->IsSystemIncludeDirectory(i, config, lang));
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 62aff99..da72d9d 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -881,22 +881,7 @@ void cmLocalGenerator::AddCompileOptions(std::string& flags,
this->AddCompilerRequirementFlag(flags, target, lang);
}
-void cmLocalGenerator::GetIncludeDirectories(std::vector<std::string>& dirs,
- cmGeneratorTarget const* target,
- const std::string& lang,
- const std::string& config,
- bool stripImplicitDirs,
- bool appendAllImplicitDirs) const
-{
- std::vector<BT<std::string>> tmp = this->GetIncludeDirectories(
- target, lang, config, stripImplicitDirs, appendAllImplicitDirs);
- dirs.reserve(tmp.size());
- for (BT<std::string>& v : tmp) {
- dirs.emplace_back(std::move(v.Value));
- }
-}
-
-std::vector<BT<std::string>> cmLocalGenerator::GetIncludeDirectories(
+std::vector<BT<std::string>> cmLocalGenerator::GetIncludeDirectoriesImplicit(
cmGeneratorTarget const* target, std::string const& lang,
std::string const& config, bool stripImplicitDirs,
bool appendAllImplicitDirs) const
@@ -1043,6 +1028,34 @@ std::vector<BT<std::string>> cmLocalGenerator::GetIncludeDirectories(
return result;
}
+void cmLocalGenerator::GetIncludeDirectoriesImplicit(
+ std::vector<std::string>& dirs, cmGeneratorTarget const* target,
+ const std::string& lang, const std::string& config, bool stripImplicitDirs,
+ bool appendAllImplicitDirs) const
+{
+ std::vector<BT<std::string>> tmp = this->GetIncludeDirectoriesImplicit(
+ target, lang, config, stripImplicitDirs, appendAllImplicitDirs);
+ dirs.reserve(dirs.size() + tmp.size());
+ for (BT<std::string>& v : tmp) {
+ dirs.emplace_back(std::move(v.Value));
+ }
+}
+
+std::vector<BT<std::string>> cmLocalGenerator::GetIncludeDirectories(
+ cmGeneratorTarget const* target, std::string const& lang,
+ std::string const& config) const
+{
+ return this->GetIncludeDirectoriesImplicit(target, lang, config);
+}
+
+void cmLocalGenerator::GetIncludeDirectories(std::vector<std::string>& dirs,
+ cmGeneratorTarget const* target,
+ const std::string& lang,
+ const std::string& config) const
+{
+ this->GetIncludeDirectoriesImplicit(dirs, target, lang, config);
+}
+
void cmLocalGenerator::GetStaticLibraryFlags(std::string& flags,
std::string const& config,
std::string const& linkLanguage,
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index ebc613b..7cc7e37 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -239,22 +239,46 @@ public:
return true;
}
- /** @brief Get the include directories for the current makefile and language.
+ /** @brief Get the include directories for the current makefile and language
+ * and optional the compiler implicit include directories.
+ *
* @arg stripImplicitDirs Strip all directories found in
* CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES from the result.
* @arg appendAllImplicitDirs Append all directories found in
* CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES to the result.
*/
+ std::vector<BT<std::string>> GetIncludeDirectoriesImplicit(
+ cmGeneratorTarget const* target, std::string const& lang = "C",
+ std::string const& config = "", bool stripImplicitDirs = true,
+ bool appendAllImplicitDirs = false) const;
+
+ /** @brief Get the include directories for the current makefile and language
+ * and optional the compiler implicit include directories.
+ *
+ * @arg dirs Directories are appended to this list
+ */
+ void GetIncludeDirectoriesImplicit(std::vector<std::string>& dirs,
+ cmGeneratorTarget const* target,
+ const std::string& lang = "C",
+ const std::string& config = "",
+ bool stripImplicitDirs = true,
+ bool appendAllImplicitDirs = false) const;
+
+ /** @brief Get the include directories for the current makefile and language.
+ * @arg dirs Include directories are appended to this list
+ */
void GetIncludeDirectories(std::vector<std::string>& dirs,
cmGeneratorTarget const* target,
const std::string& lang = "C",
- const std::string& config = "",
- bool stripImplicitDirs = true,
- bool appendAllImplicitDirs = false) const;
+ const std::string& config = "") const;
+
+ /** @brief Get the include directories for the current makefile and language.
+ * @return The include directory list
+ */
std::vector<BT<std::string>> GetIncludeDirectories(
cmGeneratorTarget const* target, std::string const& lang = "C",
- std::string const& config = "", bool stripImplicitDirs = true,
- bool appendAllImplicitDirs = false) const;
+ std::string const& config = "") const;
+
void AddCompileOptions(std::string& flags, cmGeneratorTarget* target,
const std::string& lang, const std::string& config);
diff --git a/Source/cmQtAutoGenInitializer.cxx b/Source/cmQtAutoGenInitializer.cxx
index e0795d2..817f0b7 100644
--- a/Source/cmQtAutoGenInitializer.cxx
+++ b/Source/cmQtAutoGenInitializer.cxx
@@ -531,8 +531,8 @@ bool cmQtAutoGenInitializer::InitMoc()
// include dirs off, see
// https://gitlab.kitware.com/cmake/cmake/issues/13667
std::vector<std::string> dirs;
- localGen->GetIncludeDirectories(dirs, this->Target, "CXX", cfg, false,
- appendImplicit);
+ localGen->GetIncludeDirectoriesImplicit(dirs, this->Target, "CXX", cfg,
+ false, appendImplicit);
return dirs;
};