summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-07-19 14:29:02 (GMT)
committerBrad King <brad.king@kitware.com>2019-07-19 17:05:21 (GMT)
commit3cbc15773fc12c96597d56f1f27106fa228328c8 (patch)
tree95091121c6ed2b73f66fcdfe26dc5ec1bafb758b /Source/cmGeneratorTarget.cxx
parent33494a507d45871e1a04a071ed8d3bee453986b3 (diff)
downloadCMake-3cbc15773fc12c96597d56f1f27106fa228328c8.zip
CMake-3cbc15773fc12c96597d56f1f27106fa228328c8.tar.gz
CMake-3cbc15773fc12c96597d56f1f27106fa228328c8.tar.bz2
cmGeneratorTarget: Move static functions to anonymous namespace
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx69
1 files changed, 43 insertions, 26 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index aa1f8d1..da16788 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -651,12 +651,14 @@ std::vector<cmSourceFile*> const* cmGeneratorTarget::GetSourceDepends(
return nullptr;
}
-static void handleSystemIncludesDep(
- cmLocalGenerator* lg, cmGeneratorTarget const* depTgt,
- const std::string& config, cmGeneratorTarget const* headTarget,
- cmGeneratorExpressionDAGChecker* dagChecker,
- std::vector<std::string>& result, bool excludeImported,
- std::string const& language)
+namespace {
+void handleSystemIncludesDep(cmLocalGenerator* lg,
+ cmGeneratorTarget const* depTgt,
+ const std::string& config,
+ cmGeneratorTarget const* headTarget,
+ cmGeneratorExpressionDAGChecker* dagChecker,
+ std::vector<std::string>& result,
+ bool excludeImported, std::string const& language)
{
if (const char* dirs =
depTgt->GetProperty("INTERFACE_SYSTEM_INCLUDE_DIRECTORIES")) {
@@ -679,6 +681,7 @@ static void handleSystemIncludesDep(
result);
}
}
+}
/* clang-format off */
#define IMPLEMENT_VISIT(KIND) \
@@ -1081,7 +1084,8 @@ bool cmGeneratorTarget::GetPropertyAsBool(const std::string& prop) const
return this->Target->GetPropertyAsBool(prop);
}
-static void AddInterfaceEntries(
+namespace {
+void AddInterfaceEntries(
cmGeneratorTarget const* thisTarget, std::string const& config,
std::string const& prop,
std::vector<cmGeneratorTarget::TargetPropertyEntry*>& entries)
@@ -1104,7 +1108,7 @@ static void AddInterfaceEntries(
}
}
-static void AddObjectEntries(
+void AddObjectEntries(
cmGeneratorTarget const* thisTarget, std::string const& config,
std::vector<cmGeneratorTarget::TargetPropertyEntry*>& entries)
{
@@ -1126,7 +1130,7 @@ static void AddObjectEntries(
}
}
-static bool processSources(
+bool processSources(
cmGeneratorTarget const* tgt,
const std::vector<cmGeneratorTarget::TargetPropertyEntry*>& entries,
std::vector<BT<std::string>>& srcs,
@@ -1199,6 +1203,7 @@ static bool processSources(
}
return contextDependent;
}
+}
std::vector<BT<std::string>> cmGeneratorTarget::GetSourceFilePaths(
std::string const& config) const
@@ -1853,16 +1858,17 @@ std::string cmGeneratorTarget::GetSOName(const std::string& config) const
return this->GetLibraryNames(config).SharedObject;
}
-static bool shouldAddFullLevel(cmGeneratorTarget::BundleDirectoryLevel level)
+namespace {
+bool shouldAddFullLevel(cmGeneratorTarget::BundleDirectoryLevel level)
{
return level == cmGeneratorTarget::FullLevel;
}
-static bool shouldAddContentLevel(
- cmGeneratorTarget::BundleDirectoryLevel level)
+bool shouldAddContentLevel(cmGeneratorTarget::BundleDirectoryLevel level)
{
return level == cmGeneratorTarget::ContentLevel || shouldAddFullLevel(level);
}
+}
std::string cmGeneratorTarget::GetAppBundleDirectory(
const std::string& config, BundleDirectoryLevel level) const
@@ -2765,7 +2771,9 @@ std::string cmGeneratorTarget::GetCreateRuleVariable(
}
return "";
}
-static void processIncludeDirectories(
+
+namespace {
+void processIncludeDirectories(
cmGeneratorTarget const* tgt,
const std::vector<cmGeneratorTarget::TargetPropertyEntry*>& entries,
std::vector<BT<std::string>>& includes,
@@ -2874,6 +2882,7 @@ static void processIncludeDirectories(
}
}
}
+}
std::vector<BT<std::string>> cmGeneratorTarget::GetIncludeDirectories(
const std::string& config, const std::string& lang) const
@@ -2942,7 +2951,8 @@ enum class OptionsParse
Shell
};
-static void processOptionsInternal(
+namespace {
+void processOptionsInternal(
cmGeneratorTarget const* tgt,
const std::vector<cmGeneratorTarget::TargetPropertyEntry*>& entries,
std::vector<BT<std::string>>& options,
@@ -2985,7 +2995,7 @@ static void processOptionsInternal(
}
}
-static void processCompileOptions(
+void processCompileOptions(
cmGeneratorTarget const* tgt,
const std::vector<cmGeneratorTarget::TargetPropertyEntry*>& entries,
std::vector<BT<std::string>>& options,
@@ -2997,6 +3007,7 @@ static void processCompileOptions(
config, debugOptions, "compile options", language,
OptionsParse::Shell);
}
+}
void cmGeneratorTarget::GetCompileOptions(std::vector<std::string>& result,
const std::string& config,
@@ -3051,7 +3062,8 @@ std::vector<BT<std::string>> cmGeneratorTarget::GetCompileOptions(
return result;
}
-static void processCompileFeatures(
+namespace {
+void processCompileFeatures(
cmGeneratorTarget const* tgt,
const std::vector<cmGeneratorTarget::TargetPropertyEntry*>& entries,
std::vector<BT<std::string>>& options,
@@ -3063,6 +3075,7 @@ static void processCompileFeatures(
config, debugOptions, "compile features",
std::string(), OptionsParse::None);
}
+}
void cmGeneratorTarget::GetCompileFeatures(std::vector<std::string>& result,
const std::string& config) const
@@ -3113,7 +3126,8 @@ std::vector<BT<std::string>> cmGeneratorTarget::GetCompileFeatures(
return result;
}
-static void processCompileDefinitions(
+namespace {
+void processCompileDefinitions(
cmGeneratorTarget const* tgt,
const std::vector<cmGeneratorTarget::TargetPropertyEntry*>& entries,
std::vector<BT<std::string>>& options,
@@ -3125,6 +3139,7 @@ static void processCompileDefinitions(
config, debugOptions, "compile definitions", language,
OptionsParse::None);
}
+}
void cmGeneratorTarget::GetCompileDefinitions(
std::vector<std::string>& result, const std::string& config,
@@ -4343,8 +4358,9 @@ void checkPropertyConsistency(cmGeneratorTarget const* depender,
}
}
-static std::string intersect(const std::set<std::string>& s1,
- const std::set<std::string>& s2)
+namespace {
+std::string intersect(const std::set<std::string>& s1,
+ const std::set<std::string>& s2)
{
std::set<std::string> intersect;
std::set_intersection(s1.begin(), s1.end(), s2.begin(), s2.end(),
@@ -4355,9 +4371,9 @@ static std::string intersect(const std::set<std::string>& s1,
return "";
}
-static std::string intersect(const std::set<std::string>& s1,
- const std::set<std::string>& s2,
- const std::set<std::string>& s3)
+std::string intersect(const std::set<std::string>& s1,
+ const std::set<std::string>& s2,
+ const std::set<std::string>& s3)
{
std::string result;
result = intersect(s1, s2);
@@ -4371,10 +4387,10 @@ static std::string intersect(const std::set<std::string>& s1,
return intersect(s2, s3);
}
-static std::string intersect(const std::set<std::string>& s1,
- const std::set<std::string>& s2,
- const std::set<std::string>& s3,
- const std::set<std::string>& s4)
+std::string intersect(const std::set<std::string>& s1,
+ const std::set<std::string>& s2,
+ const std::set<std::string>& s3,
+ const std::set<std::string>& s4)
{
std::string result;
result = intersect(s1, s2);
@@ -4391,6 +4407,7 @@ static std::string intersect(const std::set<std::string>& s1,
}
return intersect(s2, s3, s4);
}
+}
void cmGeneratorTarget::CheckPropertyCompatibility(
cmComputeLinkInformation* info, const std::string& config) const