summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/CPack/cmCPackGenerator.cxx5
-rw-r--r--Source/CPack/cpack.cxx3
-rw-r--r--Source/cmAddSubDirectoryCommand.cxx2
-rw-r--r--Source/cmAuxSourceDirectoryCommand.cxx1
-rw-r--r--Source/cmCacheManager.cxx38
-rw-r--r--Source/cmCacheManager.h6
-rw-r--r--Source/cmDependsC.cxx21
-rw-r--r--Source/cmGeneratorExpressionNode.cxx1
-rw-r--r--Source/cmGeneratorTarget.cxx49
-rw-r--r--Source/cmGeneratorTarget.h13
-rw-r--r--Source/cmGlobalGenerator.cxx3
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx4
-rw-r--r--Source/cmListFileCache.cxx6
-rw-r--r--Source/cmListFileCache.h5
-rw-r--r--Source/cmMakefile.cxx37
-rw-r--r--Source/cmMakefile.h44
-rw-r--r--Source/cmPolicies.cxx5
-rw-r--r--Source/cmPolicies.h2
-rw-r--r--Source/cmSubdirCommand.cxx7
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx80
-rw-r--r--Source/cmVisualStudio10TargetGenerator.h3
-rw-r--r--Source/cmake.cxx8
-rw-r--r--Source/cmake.h4
24 files changed, 205 insertions, 144 deletions
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 19d6c87..eed106d 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,5 +1,5 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 2)
-set(CMake_VERSION_PATCH 20150402)
+set(CMake_VERSION_PATCH 20150407)
#set(CMake_VERSION_RC 1)
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx
index 67005ef..995eb0d 100644
--- a/Source/CPack/cmCPackGenerator.cxx
+++ b/Source/CPack/cmCPackGenerator.cxx
@@ -1499,7 +1499,10 @@ bool cmCPackGenerator::SupportsComponentInstallation() const
//----------------------------------------------------------------------
bool cmCPackGenerator::WantsComponentInstallation() const
{
- return (!IsOn("CPACK_MONOLITHIC_INSTALL") & SupportsComponentInstallation());
+ return (!IsOn("CPACK_MONOLITHIC_INSTALL")
+ && SupportsComponentInstallation()
+ // check that package at least has components
+ && !(this->ComponentGroups.empty() || this->Components.empty()));
}
//----------------------------------------------------------------------
diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx
index 6106472..00b23cd 100644
--- a/Source/CPack/cpack.cxx
+++ b/Source/CPack/cpack.cxx
@@ -203,6 +203,9 @@ int main (int argc, char const* const* argv)
cmgg.SetCMakeInstance(&cminst);
cmsys::auto_ptr<cmLocalGenerator> cmlg(cmgg.CreateLocalGenerator());
cmMakefile* globalMF = cmlg->GetMakefile();
+#if defined(__CYGWIN__)
+ globalMF->AddDefinition("CMAKE_LEGACY_CYGWIN_WIN32", "0");
+#endif
bool cpackConfigFileSpecified = true;
if ( cpackConfigFile.empty() )
diff --git a/Source/cmAddSubDirectoryCommand.cxx b/Source/cmAddSubDirectoryCommand.cxx
index 01598bc..9d55c1a 100644
--- a/Source/cmAddSubDirectoryCommand.cxx
+++ b/Source/cmAddSubDirectoryCommand.cxx
@@ -122,7 +122,7 @@ bool cmAddSubDirectoryCommand::InitialPass
// Add the subdirectory using the computed full paths.
this->Makefile->AddSubDirectory(srcPath, binPath,
- excludeFromAll, false, true);
+ excludeFromAll, true);
return true;
}
diff --git a/Source/cmAuxSourceDirectoryCommand.cxx b/Source/cmAuxSourceDirectoryCommand.cxx
index a30d992..b8238f8 100644
--- a/Source/cmAuxSourceDirectoryCommand.cxx
+++ b/Source/cmAuxSourceDirectoryCommand.cxx
@@ -26,7 +26,6 @@ bool cmAuxSourceDirectoryCommand::InitialPass
std::string sourceListValue;
std::string templateDirectory = args[0];
- this->Makefile->AddExtraDirectory(templateDirectory.c_str());
std::string tdir;
if(!cmSystemTools::FileIsFullPath(templateDirectory.c_str()))
{
diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx
index 0c77891..fa7eff3 100644
--- a/Source/cmCacheManager.cxx
+++ b/Source/cmCacheManager.cxx
@@ -76,22 +76,10 @@ bool cmCacheManager::IsType(const char* s)
return false;
}
-bool cmCacheManager::LoadCache(cmMakefile* mf)
-{
- return this->LoadCache(mf->GetHomeOutputDirectory());
-}
-
-
bool cmCacheManager::LoadCache(const std::string& path)
{
- return this->LoadCache(path,true);
-}
-
-bool cmCacheManager::LoadCache(const std::string& path,
- bool internal)
-{
std::set<std::string> emptySet;
- return this->LoadCache(path, internal, emptySet, emptySet);
+ return this->LoadCache(path, true, emptySet, emptySet);
}
static bool ParseEntryWithoutType(const std::string& entry,
@@ -418,12 +406,6 @@ void cmCacheManager::WritePropertyEntries(std::ostream& os,
}
}
-bool cmCacheManager::SaveCache(cmMakefile* mf)
-{
- return this->SaveCache(mf->GetHomeOutputDirectory());
-}
-
-
bool cmCacheManager::SaveCache(const std::string& path)
{
std::string cacheFile = path;
@@ -914,21 +896,3 @@ bool cmCacheManager::CacheIterator::PropertyExists(
{
return this->GetProperty(prop)? true:false;
}
-
-//----------------------------------------------------------------------------
-bool cmCacheManager::NeedCacheCompatibility(int major, int minor)
-{
- // Compatibility is not needed if the cache version is zero because
- // the cache was created or modified by the user.
- if(this->CacheMajorVersion == 0)
- {
- return false;
- }
-
- // Compatibility is needed if the cache version is equal to or lower
- // than the given version.
- cmIML_INT_uint64_t actual_compat =
- CMake_VERSION_ENCODE(this->CacheMajorVersion, this->CacheMinorVersion, 0);
- return (actual_compat &&
- actual_compat <= CMake_VERSION_ENCODE(major, minor, 0));
-}
diff --git a/Source/cmCacheManager.h b/Source/cmCacheManager.h
index d9a9112..f7f8776 100644
--- a/Source/cmCacheManager.h
+++ b/Source/cmCacheManager.h
@@ -105,17 +105,12 @@ public:
static const char* TypeToString(CacheEntryType);
static bool IsType(const char*);
- ///! Load a cache for given makefile. Loads from ouput home.
- bool LoadCache(cmMakefile*);
///! Load a cache for given makefile. Loads from path/CMakeCache.txt.
bool LoadCache(const std::string& path);
- bool LoadCache(const std::string& path, bool internal);
bool LoadCache(const std::string& path, bool internal,
std::set<std::string>& excludes,
std::set<std::string>& includes);
- ///! Save cache for given makefile. Saves to ouput home CMakeCache.txt.
- bool SaveCache(cmMakefile*) ;
///! Save cache for given makefile. Saves to ouput path/CMakeCache.txt
bool SaveCache(const std::string& path) ;
@@ -149,7 +144,6 @@ public:
{ return this->CacheMajorVersion; }
unsigned int GetCacheMinorVersion() const
{ return this->CacheMinorVersion; }
- bool NeedCacheCompatibility(int major, int minor);
protected:
///! Add an entry into the cache
diff --git a/Source/cmDependsC.cxx b/Source/cmDependsC.cxx
index 63d8fa6..6cdd4c1 100644
--- a/Source/cmDependsC.cxx
+++ b/Source/cmDependsC.cxx
@@ -242,13 +242,22 @@ bool cmDependsC::WriteDependencies(const std::set<std::string>& sources,
cmsys::ifstream fin(fullName.c_str());
if(fin)
{
- // Add this file as a dependency.
- dependencies.insert(fullName);
+ cmsys::FStream::BOM bom = cmsys::FStream::ReadBOM(fin);
+ if(bom == cmsys::FStream::BOM_None ||
+ bom == cmsys::FStream::BOM_UTF8)
+ {
+ // Add this file as a dependency.
+ dependencies.insert(fullName);
- // Scan this file for new dependencies. Pass the directory
- // containing the file to handle double-quote includes.
- std::string dir = cmSystemTools::GetFilenamePath(fullName);
- this->Scan(fin, dir.c_str(), fullName);
+ // Scan this file for new dependencies. Pass the directory
+ // containing the file to handle double-quote includes.
+ std::string dir = cmSystemTools::GetFilenamePath(fullName);
+ this->Scan(fin, dir.c_str(), fullName);
+ }
+ else
+ {
+ // Skip file with encoding we do not implement.
+ }
}
}
}
diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx
index 673dcb9..2654851 100644
--- a/Source/cmGeneratorExpressionNode.cxx
+++ b/Source/cmGeneratorExpressionNode.cxx
@@ -1554,7 +1554,6 @@ class ArtifactPdbTag;
class ArtifactPathTag;
class ArtifactDirTag;
-class ArtifactNameTag;
//----------------------------------------------------------------------------
template<typename ArtifactT>
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
{
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index c329cf5..c79aa72 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -58,6 +58,12 @@ public:
const std::string& config) const;
void GetCertificates(std::vector<cmSourceFile const*>&,
const std::string& config) const;
+ void GetXamlSources(std::vector<cmSourceFile const*>&,
+ const std::string& config) const;
+ void GetExpectedXamlHeaders(std::set<std::string>&,
+ const std::string& config) const;
+ void GetExpectedXamlSources(std::set<std::string>&,
+ const std::string& config) const;
void ComputeObjectMapping();
@@ -132,6 +138,13 @@ public:
mutable std::set<std::string> ExpectedResxHeaders;
mutable std::vector<cmSourceFile const*> ResxSources;
};
+
+ struct XamlData {
+ std::set<std::string> ExpectedXamlHeaders;
+ std::set<std::string> ExpectedXamlSources;
+ std::vector<cmSourceFile const*> XamlSources;
+ };
+
private:
friend class cmTargetTraceDependencies;
struct SourceEntry { std::vector<cmSourceFile*> Depends; };
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 8123c99..3c0a0e2 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1537,10 +1537,9 @@ void cmGlobalGenerator::CheckLocalGenerators()
std::map<std::string, std::string> notFoundMap;
// std::set<std::string> notFoundMap;
// after it is all done do a ConfigureFinalPass
- cmCacheManager* manager = 0;
+ cmCacheManager* manager = this->GetCMakeInstance()->GetCacheManager();
for (unsigned int i = 0; i < this->LocalGenerators.size(); ++i)
{
- manager = this->LocalGenerators[i]->GetMakefile()->GetCacheManager();
this->LocalGenerators[i]->ConfigureFinalPass();
cmTargets &targets =
this->LocalGenerators[i]->GetMakefile()->GetTargets();
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index f139ad1..5e584a4 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -865,6 +865,10 @@ GetSourcecodeValueFromFileExtension(const std::string& _ext,
{
sourcecode += ".asm";
}
+ else if (ext == "metal")
+ {
+ sourcecode += ".metal";
+ }
//else
// {
// // Already specialized above or we leave sourcecode == "sourcecode"
diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx
index 3e26349..ddcea9b 100644
--- a/Source/cmListFileCache.cxx
+++ b/Source/cmListFileCache.cxx
@@ -146,18 +146,12 @@ bool cmListFile::ParseFile(const char* filename,
}
bool parseError = false;
- this->ModifiedTime = cmSystemTools::ModifiedTime(filename);
{
cmListFileParser parser(this, mf, filename);
parseError = !parser.ParseFile();
}
- if(parseError)
- {
- this->ModifiedTime = 0;
- }
-
// do we need a cmake_policy(VERSION call?
if(topLevel)
{
diff --git a/Source/cmListFileCache.h b/Source/cmListFileCache.h
index 2ca9b8e..544ff1b 100644
--- a/Source/cmListFileCache.h
+++ b/Source/cmListFileCache.h
@@ -85,15 +85,10 @@ class cmListFileBacktrace: public std::vector<cmListFileContext>
struct cmListFile
{
- cmListFile()
- :ModifiedTime(0)
- {
- }
bool ParseFile(const char* path,
bool topLevel,
cmMakefile *mf);
- long int ModifiedTime;
std::vector<cmListFileFunction> Functions;
};
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 7f355a6..215ee16 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -101,7 +101,6 @@ cmMakefile::cmMakefile(): Internal(new Internals)
this->AddDefaultDefinitions();
this->Initialize();
- this->PreOrder = false;
this->GeneratingBuildSystem = false;
this->SuppressWatches = false;
@@ -113,8 +112,6 @@ cmMakefile::cmMakefile(const cmMakefile& mf): Internal(new Internals)
this->Internal->VarInitStack.push(mf.Internal->VarInitStack.top());
this->Internal->VarUsageStack.push(mf.Internal->VarUsageStack.top());
- this->Prefix = mf.Prefix;
- this->AuxSourceDirectories = mf.AuxSourceDirectories;
this->cmStartDirectory = mf.cmStartDirectory;
this->StartOutputDirectory = mf.StartOutputDirectory;
this->cmHomeDirectory = mf.cmHomeDirectory;
@@ -145,9 +142,7 @@ cmMakefile::cmMakefile(const cmMakefile& mf): Internal(new Internals)
this->LocalGenerator = mf.LocalGenerator;
this->FunctionBlockers = mf.FunctionBlockers;
this->MacrosList = mf.MacrosList;
- this->SubDirectoryOrder = mf.SubDirectoryOrder;
this->Properties = mf.Properties;
- this->PreOrder = mf.PreOrder;
this->WarnUnused = mf.WarnUnused;
this->Initialize();
this->CheckSystemVars = mf.CheckSystemVars;
@@ -189,11 +184,6 @@ unsigned int cmMakefile::GetCacheMinorVersion() const
return this->GetCacheManager()->GetCacheMinorVersion();
}
-bool cmMakefile::NeedCacheCompatibility(int major, int minor) const
-{
- return this->GetCacheManager()->NeedCacheCompatibility(major, minor);
-}
-
cmMakefile::~cmMakefile()
{
cmDeleteAll(this->InstallGenerators);
@@ -1697,7 +1687,7 @@ void cmMakefile::ConfigureSubDirectory(cmLocalGenerator *lg2)
}
void cmMakefile::AddSubDirectory(const std::string& sub,
- bool excludeFromAll, bool preorder)
+ bool excludeFromAll)
{
// the source path must be made full if it isn't already
std::string srcPath = sub;
@@ -1719,13 +1709,13 @@ void cmMakefile::AddSubDirectory(const std::string& sub,
this->AddSubDirectory(srcPath, binPath,
- excludeFromAll, preorder, false);
+ excludeFromAll, false);
}
void cmMakefile::AddSubDirectory(const std::string& srcPath,
const std::string& binPath,
- bool excludeFromAll, bool preorder,
+ bool excludeFromAll,
bool immediate)
{
// Make sure the binary directory is unique.
@@ -1747,7 +1737,6 @@ void cmMakefile::AddSubDirectory(const std::string& srcPath,
{
lg2->GetMakefile()->SetProperty("EXCLUDE_FROM_ALL", "TRUE");
}
- lg2->GetMakefile()->SetPreOrder(preorder);
if (immediate)
{
@@ -2256,11 +2245,6 @@ void cmMakefile::AddSourceGroup(const std::vector<std::string>& name,
#endif
-void cmMakefile::AddExtraDirectory(const char* dir)
-{
- this->AuxSourceDirectories.push_back(dir);
-}
-
static bool mightExpandVariablesCMP0019(const char* s)
{
return s && *s && strstr(s,"${") && strchr(s,'}');
@@ -4220,8 +4204,19 @@ const char *cmMakefile::GetProperty(const std::string& prop,
}
else if (prop == "DEFINITIONS")
{
- output += this->DefineFlagsOrig;
- return output.c_str();
+ switch(this->GetPolicyStatus(cmPolicies::CMP0059))
+ {
+ case cmPolicies::WARN:
+ this->IssueMessage(cmake::AUTHOR_WARNING, this->GetPolicies()->
+ GetPolicyWarning(cmPolicies::CMP0059));
+ case cmPolicies::OLD:
+ output += this->DefineFlagsOrig;
+ return output.c_str();
+ case cmPolicies::NEW:
+ case cmPolicies::REQUIRED_ALWAYS:
+ case cmPolicies::REQUIRED_IF_USED:
+ break;
+ }
}
else if (prop == "LINK_DIRECTORIES")
{
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index e98f1d9..920b6b7 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -78,9 +78,6 @@ public:
bool VariableInitialized(const std::string& ) const;
/* return true if a variable has been used */
bool VariableUsed(const std::string& ) const;
- /** Return whether compatibility features needed for a version of
- the cache or lower should be enabled. */
- bool NeedCacheCompatibility(int major, int minor) const;
/**
* Construct an empty makefile.
@@ -292,11 +289,10 @@ public:
/**
* Add a subdirectory to the build.
*/
- void AddSubDirectory(const std::string&, bool excludeFromAll=false,
- bool preorder = false);
+ void AddSubDirectory(const std::string&, bool excludeFromAll=false);
void AddSubDirectory(const std::string& fullSrcDir,
const std::string& fullBinDir,
- bool excludeFromAll, bool preorder,
+ bool excludeFromAll,
bool immediate);
/**
@@ -433,15 +429,6 @@ public:
bool HasCMP0054AlreadyBeenReported(
cmListFileContext context) const;
- /**
- * Add an auxiliary directory to the build.
- */
- void AddExtraDirectory(const char* dir);
-
-
- /**
- * Add an auxiliary directory to the build.
- */
void MakeStartDirectoriesCurrent()
{
this->AddDefinition("CMAKE_CURRENT_SOURCE_DIR",
@@ -620,12 +607,6 @@ public:
cmSourceFile* GetOrCreateSource(const std::string& sourceName,
bool generated = false);
- /**
- * Obtain a list of auxiliary source directories.
- */
- const std::vector<std::string>& GetAuxSourceDirectories() const
- {return this->AuxSourceDirectories;}
-
//@{
/**
* Return a list of extensions associated with source and header
@@ -792,10 +773,6 @@ public:
///enabled.
void EnableLanguage(std::vector<std::string>const& languages, bool optional);
- /**
- * Set/Get the name of the parent directories CMakeLists file
- * given a current CMakeLists file name
- */
cmCacheManager *GetCacheManager() const;
/**
@@ -879,10 +856,6 @@ public:
///! Initialize a makefile from its parent
void InitializeFromParent();
- ///! Set/Get the preorder flag
- void SetPreOrder(bool p) { this->PreOrder = p; }
- bool GetPreOrder() const { return this->PreOrder; }
-
void AddInstallGenerator(cmInstallGenerator* g)
{ if(g) this->InstallGenerators.push_back(g); }
std::vector<cmInstallGenerator*>& GetInstallGenerators()
@@ -976,9 +949,6 @@ protected:
// Check for a an unused variable
void CheckForUnused(const char* reason, const std::string& name) const;
- std::string Prefix;
- std::vector<std::string> AuxSourceDirectories; //
-
std::string cmStartDirectory;
std::string StartOutputDirectory;
std::string cmHomeDirectory;
@@ -1008,9 +978,8 @@ protected:
// directories.
std::set<std::string> SystemIncludeDirectories;
- std::vector<std::string> ListFiles; // list of command files loaded
- std::vector<std::string> OutputFiles; // list of command files loaded
-
+ std::vector<std::string> ListFiles;
+ std::vector<std::string> OutputFiles;
cmTarget::LinkLibraryVectorType LinkLibraries;
@@ -1067,8 +1036,6 @@ private:
std::vector<std::string> MacrosList;
- std::map<std::string, bool> SubDirectoryOrder;
-
mutable cmsys::RegularExpression cmDefineRegex;
mutable cmsys::RegularExpression cmDefine01Regex;
mutable cmsys::RegularExpression cmAtVarRegex;
@@ -1076,9 +1043,6 @@ private:
cmPropertyMap Properties;
- // should this makefile be processed before or after processing the parent
- bool PreOrder;
-
// Unused variable flags
bool WarnUnused;
bool CheckSystemVars;
diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx
index 592df8f..0a61bca 100644
--- a/Source/cmPolicies.cxx
+++ b/Source/cmPolicies.cxx
@@ -385,6 +385,11 @@ cmPolicies::cmPolicies()
CMP0058, "CMP0058",
"Ninja requires custom command byproducts to be explicit.",
3,3,0, cmPolicies::WARN);
+
+ this->DefinePolicy(
+ CMP0059, "CMP0059",
+ "Do no treat DEFINITIONS as a built-in directory property.",
+ 3,3,0, cmPolicies::WARN);
}
cmPolicies::~cmPolicies()
diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h
index b18b337..ced9d8c 100644
--- a/Source/cmPolicies.h
+++ b/Source/cmPolicies.h
@@ -116,6 +116,8 @@ public:
CMP0057, ///< Disallow multiple MAIN_DEPENDENCY specifications
/// for the same file.
CMP0058, ///< Ninja requires custom command byproducts to be explicit
+ CMP0059, ///< Do not treat ``DEFINITIONS`` as a built-in directory
+ /// property.
/** \brief Always the last entry.
*
diff --git a/Source/cmSubdirCommand.cxx b/Source/cmSubdirCommand.cxx
index 93ad4f3..7cb2edc 100644
--- a/Source/cmSubdirCommand.cxx
+++ b/Source/cmSubdirCommand.cxx
@@ -22,7 +22,6 @@ bool cmSubdirCommand
}
bool res = true;
bool excludeFromAll = false;
- bool preorder = false;
for(std::vector<std::string>::const_iterator i = args.begin();
i != args.end(); ++i)
@@ -34,7 +33,7 @@ bool cmSubdirCommand
}
if(*i == "PREORDER")
{
- preorder = true;
+ // Ignored
continue;
}
@@ -48,7 +47,7 @@ bool cmSubdirCommand
std::string(this->Makefile->GetCurrentOutputDirectory()) +
"/" + i->c_str();
this->Makefile->AddSubDirectory(srcPath, binPath,
- excludeFromAll, preorder, false);
+ excludeFromAll, false);
}
// otherwise it is a full path
else if ( cmSystemTools::FileIsDirectory(*i) )
@@ -59,7 +58,7 @@ bool cmSubdirCommand
std::string(this->Makefile->GetCurrentOutputDirectory()) +
"/" + cmSystemTools::GetFilenameName(*i);
this->Makefile->AddSubDirectory(*i, binPath,
- excludeFromAll, preorder, false);
+ excludeFromAll, false);
}
else
{
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 19444ed..dad6f93 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -461,6 +461,7 @@ void cmVisualStudio10TargetGenerator::Generate()
this->WriteAllSources();
this->WriteDotNetReferences();
this->WriteEmbeddedResourceGroup();
+ this->WriteXamlFilesGroup();
this->WriteWinRTReferences();
this->WriteProjectReferences();
this->WriteString(
@@ -522,8 +523,7 @@ void cmVisualStudio10TargetGenerator::WriteEmbeddedResourceGroup()
this->WriteString("<DependentUpon>", 3);
std::string hFileName = obj.substr(0, obj.find_last_of(".")) + ".h";
- (*this->BuildFileStream ) << hFileName;
- this->WriteString("</DependentUpon>\n", 3);
+ (*this->BuildFileStream) << hFileName << "</DependentUpon>\n";
std::vector<std::string> const * configs =
this->GlobalGenerator->GetConfigurations();
@@ -546,6 +546,38 @@ void cmVisualStudio10TargetGenerator::WriteEmbeddedResourceGroup()
}
}
+void cmVisualStudio10TargetGenerator::WriteXamlFilesGroup()
+{
+ std::vector<cmSourceFile const*> xamlObjs;
+ this->GeneratorTarget->GetXamlSources(xamlObjs, "");
+ if (!xamlObjs.empty())
+ {
+ this->WriteString("<ItemGroup>\n", 1);
+ for (std::vector<cmSourceFile const*>::const_iterator
+ oi = xamlObjs.begin(); oi != xamlObjs.end(); ++oi)
+ {
+ std::string obj = (*oi)->GetFullPath();
+ std::string xamlType;
+ const char * xamlTypeProperty = (*oi)->GetProperty("VS_XAML_TYPE");
+ if (xamlTypeProperty)
+ {
+ xamlType = xamlTypeProperty;
+ }
+ else
+ {
+ xamlType = "Page";
+ }
+
+ this->WriteSource(xamlType, *oi, ">\n");
+ this->WriteString("<SubType>Designer</SubType>\n", 3);
+ this->WriteString("</", 2);
+ (*this->BuildFileStream) << xamlType << ">\n";
+
+ }
+ this->WriteString("</ItemGroup>\n", 1);
+ }
+}
+
void cmVisualStudio10TargetGenerator::WriteTargetSpecificReferences()
{
if(this->MSTools)
@@ -1192,12 +1224,21 @@ WriteGroupSources(const char* name,
void cmVisualStudio10TargetGenerator::WriteHeaderSource(cmSourceFile const* sf)
{
- if(this->IsResxHeader(sf->GetFullPath()))
+ std::string const& fileName = sf->GetFullPath();
+ if (this->IsResxHeader(fileName))
{
this->WriteSource("ClInclude", sf, ">\n");
this->WriteString("<FileType>CppForm</FileType>\n", 3);
this->WriteString("</ClInclude>\n", 2);
}
+ else if (this->IsXamlHeader(fileName))
+ {
+ this->WriteSource("ClInclude", sf, ">\n");
+ this->WriteString("<DependentUpon>", 3);
+ std::string xamlFileName = fileName.substr(0, fileName.find_last_of("."));
+ (*this->BuildFileStream) << xamlFileName << "</DependentUpon>\n";
+ this->WriteString("</ClInclude>\n", 2);
+ }
else
{
this->WriteSource("ClInclude", sf);
@@ -1669,6 +1710,17 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags(
" ", "\n", lang);
}
}
+ if (this->IsXamlSource(source->GetFullPath()))
+ {
+ (*this->BuildFileStream) << firstString;
+ firstString = ""; // only do firstString once
+ hasFlags = true;
+ this->WriteString("<DependentUpon>", 3);
+ const std::string& fileName = source->GetFullPath();
+ std::string xamlFileName = fileName.substr(0, fileName.find_last_of("."));
+ (*this->BuildFileStream) << xamlFileName << "</DependentUpon>\n";
+ }
+
return hasFlags;
}
@@ -2749,6 +2801,28 @@ bool cmVisualStudio10TargetGenerator::
return it != expectedResxHeaders.end();
}
+bool cmVisualStudio10TargetGenerator::
+IsXamlHeader(const std::string& headerFile)
+{
+ std::set<std::string> expectedXamlHeaders;
+ this->GeneratorTarget->GetExpectedXamlHeaders(expectedXamlHeaders, "");
+
+ std::set<std::string>::const_iterator it =
+ expectedXamlHeaders.find(headerFile);
+ return it != expectedXamlHeaders.end();
+}
+
+bool cmVisualStudio10TargetGenerator::
+IsXamlSource(const std::string& sourceFile)
+{
+ std::set<std::string> expectedXamlSources;
+ this->GeneratorTarget->GetExpectedXamlSources(expectedXamlSources, "");
+
+ std::set<std::string>::const_iterator it =
+ expectedXamlSources.find(sourceFile);
+ return it != expectedXamlSources.end();
+}
+
void cmVisualStudio10TargetGenerator::WriteApplicationTypeSettings()
{
bool isAppContainer = false;
diff --git a/Source/cmVisualStudio10TargetGenerator.h b/Source/cmVisualStudio10TargetGenerator.h
index a02dfa8..a2776de 100644
--- a/Source/cmVisualStudio10TargetGenerator.h
+++ b/Source/cmVisualStudio10TargetGenerator.h
@@ -69,6 +69,7 @@ private:
void WriteEmbeddedResourceGroup();
void WriteWinRTReferences();
void WriteWinRTPackageCertificateKeyFile();
+ void WriteXamlFilesGroup();
void WritePathAndIncrementalLinkOptions();
void WriteItemDefinitionGroups();
void VerifyNecessaryFiles();
@@ -119,6 +120,8 @@ private:
void AddMissingSourceGroups(std::set<cmSourceGroup*>& groupsUsed,
const std::vector<cmSourceGroup>& allGroups);
bool IsResxHeader(const std::string& headerFile);
+ bool IsXamlHeader(const std::string& headerFile);
+ bool IsXamlSource(const std::string& headerFile);
cmIDEFlagTable const* GetClFlagTable() const;
cmIDEFlagTable const* GetRcFlagTable() const;
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 51df7f2..5c52a1a 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -188,7 +188,6 @@ void cmake::InitializeProperties()
{
this->Properties.clear();
this->Properties.SetCMakeInstance(this);
- this->AccessedProperties.clear();
this->PropertyDefinitions.clear();
// initialize properties
@@ -213,7 +212,7 @@ void cmake::CleanupCommandsAndMacros()
delete j->second;
}
}
- this->Commands.erase(this->Commands.begin(), this->Commands.end());
+ this->Commands.clear();
std::vector<cmCommand*>::iterator it;
for ( it = commands.begin(); it != commands.end();
++ it )
@@ -2274,8 +2273,6 @@ const char *cmake::GetProperty(const std::string& prop)
const char *cmake::GetProperty(const std::string& prop,
cmProperty::ScopeType scope)
{
- bool chain = false;
-
// watch for special properties
std::string output = "";
if ( prop == "CACHE_VARIABLES" )
@@ -2333,7 +2330,8 @@ const char *cmake::GetProperty(const std::string& prop,
return FOR_EACH_CXX_FEATURE(STRING_LIST_ELEMENT) + 1;
}
#undef STRING_LIST_ELEMENT
- return this->Properties.GetPropertyValue(prop, scope, chain);
+ bool dummy = false;
+ return this->Properties.GetPropertyValue(prop, scope, dummy);
}
bool cmake::GetPropertyAsBool(const std::string& prop)
diff --git a/Source/cmake.h b/Source/cmake.h
index 60ffcd4..c22b329 100644
--- a/Source/cmake.h
+++ b/Source/cmake.h
@@ -287,9 +287,6 @@ class cmake
cmProperty::ScopeType scope);
bool GetPropertyAsBool(const std::string& prop);
- // Get the properties
- cmPropertyMap &GetProperties() { return this->Properties; }
-
///! Get or create an cmInstalledFile instance and return a pointer to it
cmInstalledFile *GetOrCreateInstalledFile(
cmMakefile* mf, const std::string& name);
@@ -383,7 +380,6 @@ protected:
void InitializeProperties();
int HandleDeleteCacheVariables(const std::string& var);
cmPropertyMap Properties;
- std::set<std::pair<std::string,cmProperty::ScopeType> > AccessedProperties;
std::map<cmProperty::ScopeType, cmPropertyDefinitionMap>
PropertyDefinitions;