summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-05-15 11:33:08 (GMT)
committerBrad King <brad.king@kitware.com>2020-05-18 16:56:56 (GMT)
commit65fe58a4b46c0233be39f580814a05d5b5fb50a3 (patch)
tree266fe92879de4639029ba87603596173375f4454 /Source/cmGeneratorTarget.cxx
parent3fa3b7a40273ba1e95c68794e1685345c8f78ab0 (diff)
downloadCMake-65fe58a4b46c0233be39f580814a05d5b5fb50a3.zip
CMake-65fe58a4b46c0233be39f580814a05d5b5fb50a3.tar.gz
CMake-65fe58a4b46c0233be39f580814a05d5b5fb50a3.tar.bz2
cmVisualStudio10TargetGenerator: Adopt Windows Store and Phone infrastructure
Move support for Resx, Xaml, Certificate, and AppManifest file handling out of cmGeneratorTarget.
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx75
1 files changed, 12 insertions, 63 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 4cf2691..2f9da1c 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -976,51 +976,12 @@ void cmGeneratorTarget::GetExternalObjects(
IMPLEMENT_VISIT(SourceKindExternalObject);
}
-void cmGeneratorTarget::GetExpectedResxHeaders(std::set<std::string>& headers,
- const std::string& config) const
-{
- KindedSources const& kinded = this->GetKindedSources(config);
- headers = kinded.ExpectedResxHeaders;
-}
-
-void cmGeneratorTarget::GetResxSources(std::vector<cmSourceFile const*>& data,
- const std::string& config) const
-{
- IMPLEMENT_VISIT(SourceKindResx);
-}
-
-void cmGeneratorTarget::GetAppManifest(std::vector<cmSourceFile const*>& data,
- const std::string& config) const
-{
- IMPLEMENT_VISIT(SourceKindAppManifest);
-}
-
void cmGeneratorTarget::GetManifests(std::vector<cmSourceFile const*>& data,
const std::string& config) const
{
IMPLEMENT_VISIT(SourceKindManifest);
}
-void cmGeneratorTarget::GetCertificates(std::vector<cmSourceFile const*>& data,
- const std::string& config) const
-{
- IMPLEMENT_VISIT(SourceKindCertificate);
-}
-
-void cmGeneratorTarget::GetExpectedXamlHeaders(std::set<std::string>& headers,
- const std::string& config) const
-{
- KindedSources const& kinded = this->GetKindedSources(config);
- headers = kinded.ExpectedXamlHeaders;
-}
-
-void cmGeneratorTarget::GetExpectedXamlSources(std::set<std::string>& srcs,
- const std::string& config) const
-{
- KindedSources const& kinded = this->GetKindedSources(config);
- srcs = kinded.ExpectedXamlSources;
-}
-
std::set<cmLinkItem> const& cmGeneratorTarget::GetUtilityItems() const
{
if (!this->UtilityItemsDone) {
@@ -1040,12 +1001,6 @@ std::set<cmLinkItem> const& cmGeneratorTarget::GetUtilityItems() const
return this->UtilityItems;
}
-void cmGeneratorTarget::GetXamlSources(std::vector<cmSourceFile const*>& data,
- const std::string& config) const
-{
- IMPLEMENT_VISIT(SourceKindXaml);
-}
-
const std::string& cmGeneratorTarget::GetLocation(
const std::string& config) const
{
@@ -1728,14 +1683,6 @@ void cmGeneratorTarget::ComputeKindedSources(KindedSources& files,
}
} else if (ext == "resx") {
kind = SourceKindResx;
- // Build and save the name of the corresponding .h file
- // This relationship will be used later when building the project files.
- // Both names would have been auto generated from Visual Studio
- // where the user supplied the file name and Visual Studio
- // appended the suffix.
- std::string resx = sf->ResolveFullPath();
- std::string hFileName = resx.substr(0, resx.find_last_of('.')) + ".h";
- files.ExpectedResxHeaders.insert(hFileName);
} else if (ext == "appxmanifest") {
kind = SourceKindAppManifest;
} else if (ext == "manifest") {
@@ -1744,16 +1691,6 @@ void cmGeneratorTarget::ComputeKindedSources(KindedSources& files,
kind = SourceKindCertificate;
} else if (ext == "xaml") {
kind = SourceKindXaml;
- // Build and save the name of the corresponding .h and .cpp file
- // This relationship will be used later when building the project files.
- // Both names would have been auto generated from Visual Studio
- // where the user supplied the file name and Visual Studio
- // appended the suffix.
- std::string xaml = sf->ResolveFullPath();
- std::string hFileName = xaml + ".h";
- std::string cppFileName = xaml + ".cpp";
- files.ExpectedXamlHeaders.insert(hFileName);
- files.ExpectedXamlSources.insert(cppFileName);
} else if (header_regex.find(sf->ResolveFullPath())) {
kind = SourceKindHeader;
} else {
@@ -1811,6 +1748,18 @@ void cmGeneratorTarget::ComputeAllConfigSources() const
}
}
+std::vector<cmGeneratorTarget::AllConfigSource>
+cmGeneratorTarget::GetAllConfigSources(SourceKind kind) const
+{
+ std::vector<AllConfigSource> result;
+ for (AllConfigSource const& source : this->GetAllConfigSources()) {
+ if (source.Kind == kind) {
+ result.push_back(source);
+ }
+ }
+ return result;
+}
+
std::set<std::string> cmGeneratorTarget::GetAllConfigCompileLanguages() const
{
std::set<std::string> languages;