summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx49
1 files changed, 49 insertions, 0 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index e0af47a..41d12d7 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -56,6 +56,7 @@ struct ResxTag {};
struct ModuleDefinitionFileTag {};
struct AppManifestTag{};
struct CertificatesTag{};
+struct XamlTag{};
template<typename Tag, typename OtherTag>
struct IsSameTag
@@ -98,6 +99,20 @@ struct DoAccept<true>
data.ExpectedResxHeaders.insert(hFileName);
data.ResxSources.push_back(f);
}
+ static void Do(cmGeneratorTarget::XamlData& data, cmSourceFile* f)
+ {
+ // 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 = f->GetFullPath();
+ std::string hFileName = xaml + ".h";
+ std::string cppFileName = xaml + ".cpp";
+ data.ExpectedXamlHeaders.insert(hFileName);
+ data.ExpectedXamlSources.insert(cppFileName);
+ data.XamlSources.push_back(f);
+ }
static void Do(std::string& data, cmSourceFile* f)
{
data = f->GetFullPath();
@@ -186,6 +201,10 @@ struct TagVisitor
{
DoAccept<IsSameTag<Tag, CertificatesTag>::Result>::Do(this->Data, sf);
}
+ else if (ext == "xaml")
+ {
+ DoAccept<IsSameTag<Tag, XamlTag>::Result>::Do(this->Data, sf);
+ }
else if(this->Header.find(sf->GetFullPath().c_str()))
{
DoAccept<IsSameTag<Tag, HeaderSourcesTag>::Result>::Do(this->Data, sf);
@@ -438,6 +457,36 @@ cmGeneratorTarget
}
//----------------------------------------------------------------------------
+void
+cmGeneratorTarget::GetExpectedXamlHeaders(std::set<std::string>& headers,
+ const std::string& config) const
+{
+ XamlData data;
+ IMPLEMENT_VISIT_IMPL(Xaml, COMMA cmGeneratorTarget::XamlData)
+ headers = data.ExpectedXamlHeaders;
+}
+
+//----------------------------------------------------------------------------
+void
+cmGeneratorTarget::GetExpectedXamlSources(std::set<std::string>& srcs,
+ const std::string& config) const
+{
+ XamlData data;
+ IMPLEMENT_VISIT_IMPL(Xaml, COMMA cmGeneratorTarget::XamlData)
+ srcs = data.ExpectedXamlSources;
+}
+
+//----------------------------------------------------------------------------
+void cmGeneratorTarget
+::GetXamlSources(std::vector<cmSourceFile const*>& srcs,
+ const std::string& config) const
+{
+ XamlData data;
+ IMPLEMENT_VISIT_IMPL(Xaml, COMMA cmGeneratorTarget::XamlData)
+ srcs = data.XamlSources;
+}
+
+//----------------------------------------------------------------------------
bool cmGeneratorTarget::IsSystemIncludeDirectory(const std::string& dir,
const std::string& config) const
{