summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/FindGTest.cmake4
-rw-r--r--Modules/InstallRequiredSystemLibraries.cmake12
-rw-r--r--Modules/Platform/HP-UX-GNU-ASM.cmake2
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/cmBuildCommand.cxx10
-rw-r--r--Source/cmComputeLinkDepends.cxx4
-rw-r--r--Source/cmComputeLinkDepends.h2
-rw-r--r--Source/cmComputeLinkInformation.cxx2
-rw-r--r--Source/cmComputeTargetDepends.cxx4
-rw-r--r--Source/cmDefinitions.cxx37
-rw-r--r--Source/cmDefinitions.h19
-rw-r--r--Source/cmExportBuildFileGenerator.cxx2
-rw-r--r--Source/cmExportCommand.cxx3
-rw-r--r--Source/cmExportInstallFileGenerator.cxx2
-rw-r--r--Source/cmFileCommand.cxx7
-rw-r--r--Source/cmFindLibraryCommand.cxx2
-rw-r--r--Source/cmGeneratorExpressionEvaluationFile.cxx6
-rw-r--r--Source/cmGeneratorExpressionNode.cxx3
-rw-r--r--Source/cmGeneratorTarget.cxx11
-rw-r--r--Source/cmGetCMakePropertyCommand.cxx3
-rw-r--r--Source/cmGetDirectoryPropertyCommand.cxx2
-rw-r--r--Source/cmGetPropertyCommand.cxx3
-rw-r--r--Source/cmIncludeCommand.cxx3
-rw-r--r--Source/cmInstallCommand.cxx32
-rw-r--r--Source/cmInstallFilesCommand.cxx5
-rw-r--r--Source/cmInstallProgramsCommand.cxx5
-rw-r--r--Source/cmInstallTargetGenerator.cxx6
-rw-r--r--Source/cmInstallTargetsCommand.cxx5
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.h1
-rw-r--r--Source/cmMakefile.cxx101
-rw-r--r--Source/cmMakefile.h2
-rw-r--r--Source/cmMakefileTargetGenerator.cxx10
-rw-r--r--Source/cmQtAutoGenerators.cxx7
-rw-r--r--Source/cmSetPropertyCommand.cxx3
-rw-r--r--Source/cmSourceFile.cxx2
-rw-r--r--Source/cmSourceFileLocation.cxx3
-rw-r--r--Source/cmState.cxx7
-rw-r--r--Source/cmTarget.cxx18
38 files changed, 159 insertions, 193 deletions
diff --git a/Modules/FindGTest.cmake b/Modules/FindGTest.cmake
index e6b5b0a..fccf877 100644
--- a/Modules/FindGTest.cmake
+++ b/Modules/FindGTest.cmake
@@ -115,11 +115,11 @@ function(GTEST_ADD_TESTS executable extra_args)
# obtain sources used for building that executable
get_property(ARGN TARGET ${executable} PROPERTY SOURCES)
endif()
- set(gtest_case_name_regex ".*\\( *([A-Za-z_0-9]+), *([A-Za-z_0-9]+) *\\).*")
+ set(gtest_case_name_regex ".*\\( *([A-Za-z_0-9]+) *, *([A-Za-z_0-9]+) *\\).*")
set(gtest_test_type_regex "(TYPED_TEST|TEST_?[FP]?)")
foreach(source ${ARGN})
file(READ "${source}" contents)
- string(REGEX MATCHALL "${gtest_test_type_regex}\\(([A-Za-z_0-9 ,]+)\\)" found_tests ${contents})
+ string(REGEX MATCHALL "${gtest_test_type_regex} *\\(([A-Za-z_0-9 ,]+)\\)" found_tests ${contents})
foreach(hit ${found_tests})
string(REGEX MATCH "${gtest_test_type_regex}" test_type ${hit})
diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake
index 5509b28..2ff9aed 100644
--- a/Modules/InstallRequiredSystemLibraries.cmake
+++ b/Modules/InstallRequiredSystemLibraries.cmake
@@ -185,8 +185,12 @@ if(MSVC)
if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
set(__install__libs
"${MSVC${v}_CRT_DIR}/msvcp${v}0.dll"
- "${MSVC${v}_CRT_DIR}/msvcr${v}0.dll"
)
+ if(NOT v VERSION_LESS 14)
+ list(APPEND __install__libs "${MSVC${v}_CRT_DIR}/vcruntime${v}0.dll")
+ else()
+ list(APPEND __install__libs "${MSVC${v}_CRT_DIR}/msvcr${v}0.dll")
+ endif()
else()
set(__install__libs)
endif()
@@ -196,8 +200,12 @@ if(MSVC)
"${MSVC${v}_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC${v}0.DebugCRT")
set(__install__libs ${__install__libs}
"${MSVC${v}_CRT_DIR}/msvcp${v}0d.dll"
- "${MSVC${v}_CRT_DIR}/msvcr${v}0d.dll"
)
+ if(NOT v VERSION_LESS 14)
+ list(APPEND __install__libs "${MSVC${v}_CRT_DIR}/vcruntime${v}0d.dll")
+ else()
+ list(APPEND __install__libs "${MSVC${v}_CRT_DIR}/msvcr${v}0d.dll")
+ endif()
endif()
endmacro()
diff --git a/Modules/Platform/HP-UX-GNU-ASM.cmake b/Modules/Platform/HP-UX-GNU-ASM.cmake
new file mode 100644
index 0000000..613b859
--- /dev/null
+++ b/Modules/Platform/HP-UX-GNU-ASM.cmake
@@ -0,0 +1,2 @@
+include(Platform/HP-UX-GNU)
+__hpux_compiler_gnu(ASM)
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index e2b4f1e..8a73f00 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 20150502)
+set(CMake_VERSION_PATCH 20150505)
#set(CMake_VERSION_RC 1)
diff --git a/Source/cmBuildCommand.cxx b/Source/cmBuildCommand.cxx
index cdca792..988e9a7 100644
--- a/Source/cmBuildCommand.cxx
+++ b/Source/cmBuildCommand.cxx
@@ -105,9 +105,8 @@ bool cmBuildCommand
"Ignoring PROJECT_NAME option because it has no effect.");
}
- std::string makecommand = this->Makefile->GetLocalGenerator()
- ->GetGlobalGenerator()->GenerateCMakeBuildCommand(target, configuration,
- "", true);
+ std::string makecommand = this->Makefile->GetGlobalGenerator()
+ ->GenerateCMakeBuildCommand(target, configuration, "", true);
this->Makefile->AddDefinition(variable, makecommand.c_str());
@@ -135,9 +134,8 @@ bool cmBuildCommand
configType = cfg;
}
- std::string makecommand = this->Makefile->GetLocalGenerator()
- ->GetGlobalGenerator()->GenerateCMakeBuildCommand("", configType,
- "", true);
+ std::string makecommand = this->Makefile->GetGlobalGenerator()
+ ->GenerateCMakeBuildCommand("", configType, "", true);
if(cacheValue)
{
diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx
index 6005d5f..abd9877 100644
--- a/Source/cmComputeLinkDepends.cxx
+++ b/Source/cmComputeLinkDepends.cxx
@@ -13,7 +13,6 @@
#include "cmComputeComponentGraph.h"
#include "cmGlobalGenerator.h"
-#include "cmLocalGenerator.h"
#include "cmMakefile.h"
#include "cmTarget.h"
#include "cmake.h"
@@ -179,8 +178,7 @@ cmComputeLinkDepends
// Store context information.
this->Target = target;
this->Makefile = this->Target->GetMakefile();
- this->LocalGenerator = this->Makefile->GetLocalGenerator();
- this->GlobalGenerator = this->LocalGenerator->GetGlobalGenerator();
+ this->GlobalGenerator = this->Makefile->GetGlobalGenerator();
this->CMakeInstance = this->GlobalGenerator->GetCMakeInstance();
// The configuration being linked.
diff --git a/Source/cmComputeLinkDepends.h b/Source/cmComputeLinkDepends.h
index a931726..09b9d70 100644
--- a/Source/cmComputeLinkDepends.h
+++ b/Source/cmComputeLinkDepends.h
@@ -21,7 +21,6 @@
class cmComputeComponentGraph;
class cmGlobalGenerator;
-class cmLocalGenerator;
class cmMakefile;
class cmTarget;
class cmake;
@@ -60,7 +59,6 @@ private:
// Context information.
cmTarget const* Target;
cmMakefile* Makefile;
- cmLocalGenerator* LocalGenerator;
cmGlobalGenerator const* GlobalGenerator;
cmake* CMakeInstance;
bool DebugMode;
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx
index 3c90ae2..e6cbe60 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -247,7 +247,7 @@ cmComputeLinkInformation
this->Target = target;
this->Makefile = this->Target->GetMakefile();
this->LocalGenerator = this->Makefile->GetLocalGenerator();
- this->GlobalGenerator = this->LocalGenerator->GetGlobalGenerator();
+ this->GlobalGenerator = this->Makefile->GetGlobalGenerator();
this->CMakeInstance = this->GlobalGenerator->GetCMakeInstance();
// Check whether to recognize OpenBSD-style library versioned names.
diff --git a/Source/cmComputeTargetDepends.cxx b/Source/cmComputeTargetDepends.cxx
index c7be221..87b47b4 100644
--- a/Source/cmComputeTargetDepends.cxx
+++ b/Source/cmComputeTargetDepends.cxx
@@ -216,9 +216,7 @@ void cmComputeTargetDepends::CollectTargetDepends(int depender_index)
// deal with config-specific dependencies.
{
std::set<std::string> emitted;
- cmGeneratorTarget* gt = depender->GetMakefile()->GetLocalGenerator()
- ->GetGlobalGenerator()
- ->GetGeneratorTarget(depender);
+ cmGeneratorTarget* gt = this->GlobalGenerator->GetGeneratorTarget(depender);
std::vector<std::string> configs;
depender->GetMakefile()->GetConfigurations(configs);
diff --git a/Source/cmDefinitions.cxx b/Source/cmDefinitions.cxx
index 61328be..f54bc4d 100644
--- a/Source/cmDefinitions.cxx
+++ b/Source/cmDefinitions.cxx
@@ -11,38 +11,39 @@
============================================================================*/
#include "cmDefinitions.h"
-//----------------------------------------------------------------------------
-cmDefinitions::Def cmDefinitions::NoDef;
+#include <assert.h>
//----------------------------------------------------------------------------
-cmDefinitions::cmDefinitions(cmDefinitions* parent)
- : Up(parent)
-{
-}
+cmDefinitions::Def cmDefinitions::NoDef;
//----------------------------------------------------------------------------
-cmDefinitions::Def const&
-cmDefinitions::GetInternal(const std::string& key)
+cmDefinitions::Def const& cmDefinitions::GetInternal(
+ const std::string& key,
+ std::list<cmDefinitions>::reverse_iterator rbegin,
+ std::list<cmDefinitions>::reverse_iterator rend)
{
- MapType::const_iterator i = this->Map.find(key);
- if(i != this->Map.end())
+ assert(rbegin != rend);
+ MapType::const_iterator i = rbegin->Map.find(key);
+ if (i != rbegin->Map.end())
{
return i->second;
}
- cmDefinitions* up = this->Up;
- if(!up)
+ std::list<cmDefinitions>::reverse_iterator rit = rbegin;
+ ++rit;
+ if (rit == rend)
{
- return this->NoDef;
+ return cmDefinitions::NoDef;
}
- // Query the parent scope and store the result locally.
- Def def = up->GetInternal(key);
- return this->Map.insert(MapType::value_type(key, def)).first->second;
+ Def const& def = cmDefinitions::GetInternal(key, rit, rend);
+ return rbegin->Map.insert(MapType::value_type(key, def)).first->second;
}
//----------------------------------------------------------------------------
-const char* cmDefinitions::Get(const std::string& key)
+const char* cmDefinitions::Get(const std::string& key,
+ std::list<cmDefinitions>::reverse_iterator rbegin,
+ std::list<cmDefinitions>::reverse_iterator rend)
{
- Def const& def = this->GetInternal(key);
+ Def const& def = cmDefinitions::GetInternal(key, rbegin, rend);
return def.Exists? def.c_str() : 0;
}
diff --git a/Source/cmDefinitions.h b/Source/cmDefinitions.h
index 4c7f11f..b244793 100644
--- a/Source/cmDefinitions.h
+++ b/Source/cmDefinitions.h
@@ -29,15 +29,11 @@
class cmDefinitions
{
public:
- /** Construct with the given parent scope. */
- cmDefinitions(cmDefinitions* parent = 0);
-
- /** Returns the parent scope, if any. */
- cmDefinitions* GetParent() const { return this->Up; }
-
/** Get the value associated with a key; null if none.
Store the result locally if it came from a parent. */
- const char* Get(const std::string& key);
+ static const char* Get(const std::string& key,
+ std::list<cmDefinitions>::reverse_iterator rbegin,
+ std::list<cmDefinitions>::reverse_iterator rend);
/** Set (or unset if null) a value associated with a key. */
void Set(const std::string& key, const char* value);
@@ -69,9 +65,6 @@ private:
};
static Def NoDef;
- // Parent scope, if any.
- cmDefinitions* Up;
-
// Local definitions, set or unset.
#if defined(CMAKE_BUILD_WITH_CMAKE)
typedef cmsys::hash_map<std::string, Def> MapType;
@@ -80,9 +73,9 @@ private:
#endif
MapType Map;
- // Internal query and update methods.
- Def const& GetInternal(const std::string& key);
-
+ static Def const& GetInternal(const std::string& key,
+ std::list<cmDefinitions>::reverse_iterator rbegin,
+ std::list<cmDefinitions>::reverse_iterator rend);
void MakeClosure(std::set<std::string>& undefined,
std::list<cmDefinitions>::const_reverse_iterator rbegin,
std::list<cmDefinitions>::const_reverse_iterator rend);
diff --git a/Source/cmExportBuildFileGenerator.cxx b/Source/cmExportBuildFileGenerator.cxx
index b1203dd..bf18deb 100644
--- a/Source/cmExportBuildFileGenerator.cxx
+++ b/Source/cmExportBuildFileGenerator.cxx
@@ -274,7 +274,7 @@ cmExportBuildFileGenerator
::FindNamespaces(cmMakefile* mf, const std::string& name)
{
std::vector<std::string> namespaces;
- cmGlobalGenerator* gg = mf->GetLocalGenerator()->GetGlobalGenerator();
+ cmGlobalGenerator* gg = mf->GetGlobalGenerator();
std::map<std::string, cmExportBuildFileGenerator*>& exportSets
= gg->GetBuildExportSets();
diff --git a/Source/cmExportCommand.cxx b/Source/cmExportCommand.cxx
index 06541c0..43d26f9 100644
--- a/Source/cmExportCommand.cxx
+++ b/Source/cmExportCommand.cxx
@@ -119,8 +119,7 @@ bool cmExportCommand
std::vector<std::string> targets;
- cmGlobalGenerator *gg = this->Makefile->GetLocalGenerator()
- ->GetGlobalGenerator();
+ cmGlobalGenerator *gg = this->Makefile->GetGlobalGenerator();
if(args[0] == "EXPORT")
{
diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx
index 6d639c9..89c6ca2 100644
--- a/Source/cmExportInstallFileGenerator.cxx
+++ b/Source/cmExportInstallFileGenerator.cxx
@@ -479,7 +479,7 @@ cmExportInstallFileGenerator
::FindNamespaces(cmMakefile* mf, const std::string& name)
{
std::vector<std::string> namespaces;
- cmGlobalGenerator* gg = mf->GetLocalGenerator()->GetGlobalGenerator();
+ cmGlobalGenerator* gg = mf->GetGlobalGenerator();
const cmExportSetMap& exportSets = gg->GetExportSets();
for(cmExportSetMap::const_iterator expIt = exportSets.begin();
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index f695393..0af4688 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -3566,8 +3566,7 @@ void cmFileCommand::AddEvaluationFile(const std::string &inputName,
cmsys::auto_ptr<cmCompiledGeneratorExpression> conditionCge
= conditionGe.Parse(condition);
- this->Makefile->GetLocalGenerator()
- ->GetGlobalGenerator()->AddEvaluationFile(inputName,
+ this->Makefile->GetGlobalGenerator()->AddEvaluationFile(inputName,
outputCge,
this->Makefile,
conditionCge,
@@ -3770,8 +3769,8 @@ bool cmFileCommand::HandleLockCommand(
fclose(file);
// Actual lock/unlock
- cmFileLockPool& lockPool = this->Makefile->GetLocalGenerator()->
- GetGlobalGenerator()->GetFileLockPool();
+ cmFileLockPool& lockPool = this->Makefile->GetGlobalGenerator()
+ ->GetFileLockPool();
cmFileLockResult fileLockResult(cmFileLockResult::MakeOk());
if (release)
diff --git a/Source/cmFindLibraryCommand.cxx b/Source/cmFindLibraryCommand.cxx
index 507d011..0a66732 100644
--- a/Source/cmFindLibraryCommand.cxx
+++ b/Source/cmFindLibraryCommand.cxx
@@ -212,7 +212,7 @@ struct cmFindLibraryHelper
cmFindLibraryHelper::cmFindLibraryHelper(cmMakefile* mf):
Makefile(mf)
{
- this->GG = this->Makefile->GetLocalGenerator()->GetGlobalGenerator();
+ this->GG = this->Makefile->GetGlobalGenerator();
// Collect the list of library name prefixes/suffixes to try.
const char* prefixes_list =
diff --git a/Source/cmGeneratorExpressionEvaluationFile.cxx b/Source/cmGeneratorExpressionEvaluationFile.cxx
index fa00283..c726995 100644
--- a/Source/cmGeneratorExpressionEvaluationFile.cxx
+++ b/Source/cmGeneratorExpressionEvaluationFile.cxx
@@ -103,8 +103,7 @@ void cmGeneratorExpressionEvaluationFile::CreateOutputFile(
std::string const& config)
{
std::vector<std::string> enabledLanguages;
- cmGlobalGenerator *gg
- = this->Makefile->GetLocalGenerator()->GetGlobalGenerator();
+ cmGlobalGenerator *gg = this->Makefile->GetGlobalGenerator();
gg->GetEnabledLanguages(enabledLanguages);
for(std::vector<std::string>::const_iterator le = enabledLanguages.begin();
@@ -168,8 +167,7 @@ void cmGeneratorExpressionEvaluationFile::Generate()
}
std::vector<std::string> enabledLanguages;
- cmGlobalGenerator *gg
- = this->Makefile->GetLocalGenerator()->GetGlobalGenerator();
+ cmGlobalGenerator *gg = this->Makefile->GetGlobalGenerator();
gg->GetEnabledLanguages(enabledLanguages);
for(std::vector<std::string>::const_iterator le = enabledLanguages.begin();
diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx
index 7cfef02..293eb41 100644
--- a/Source/cmGeneratorExpressionNode.cxx
+++ b/Source/cmGeneratorExpressionNode.cxx
@@ -767,8 +767,7 @@ static const struct CompileLanguageNode : public cmGeneratorExpressionNode
}
std::vector<std::string> enabledLanguages;
- cmGlobalGenerator* gg
- = context->Makefile->GetLocalGenerator()->GetGlobalGenerator();
+ cmGlobalGenerator* gg = context->Makefile->GetGlobalGenerator();
gg->GetEnabledLanguages(enabledLanguages);
if (!parameters.empty() &&
std::find(enabledLanguages.begin(), enabledLanguages.end(),
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 1a4f9c4..e2b8c45 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -132,8 +132,7 @@ struct TagVisitor
TagVisitor(cmTarget *target, DataType& data)
: Data(data), Target(target),
- GlobalGenerator(target->GetMakefile()
- ->GetLocalGenerator()->GetGlobalGenerator()),
+ GlobalGenerator(target->GetMakefile()->GetGlobalGenerator()),
Header(CM_HEADER_REGEX),
IsObjLib(target->GetType() == cmTarget::OBJECT_LIBRARY)
{
@@ -226,7 +225,7 @@ cmGeneratorTarget::cmGeneratorTarget(cmTarget* t): Target(t),
{
this->Makefile = this->Target->GetMakefile();
this->LocalGenerator = this->Makefile->GetLocalGenerator();
- this->GlobalGenerator = this->LocalGenerator->GetGlobalGenerator();
+ this->GlobalGenerator = this->Makefile->GetGlobalGenerator();
}
//----------------------------------------------------------------------------
@@ -648,8 +647,7 @@ cmTargetTraceDependencies
{
// Convenience.
this->Makefile = this->Target->GetMakefile();
- this->GlobalGenerator =
- this->Makefile->GetLocalGenerator()->GetGlobalGenerator();
+ this->GlobalGenerator = this->Makefile->GetGlobalGenerator();
this->CurrentEntry = 0;
// Queue all the source files already specified for the target.
@@ -1025,8 +1023,7 @@ void cmGeneratorTarget::GenerateTargetManifest(
return;
}
cmMakefile* mf = this->Target->GetMakefile();
- cmLocalGenerator* lg = mf->GetLocalGenerator();
- cmGlobalGenerator* gg = lg->GetGlobalGenerator();
+ cmGlobalGenerator* gg = mf->GetGlobalGenerator();
// Get the names.
std::string name;
diff --git a/Source/cmGetCMakePropertyCommand.cxx b/Source/cmGetCMakePropertyCommand.cxx
index b035750..76803c1 100644
--- a/Source/cmGetCMakePropertyCommand.cxx
+++ b/Source/cmGetCMakePropertyCommand.cxx
@@ -47,8 +47,7 @@ bool cmGetCMakePropertyCommand
else if ( args[1] == "COMPONENTS" )
{
const std::set<std::string>* components
- = this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
- ->GetInstallComponents();
+ = this->Makefile->GetGlobalGenerator()->GetInstallComponents();
output = cmJoin(*components, ";");
}
else
diff --git a/Source/cmGetDirectoryPropertyCommand.cxx b/Source/cmGetDirectoryPropertyCommand.cxx
index 881b2ae..4fe3318 100644
--- a/Source/cmGetDirectoryPropertyCommand.cxx
+++ b/Source/cmGetDirectoryPropertyCommand.cxx
@@ -53,7 +53,7 @@ bool cmGetDirectoryPropertyCommand
// lookup the makefile from the directory name
cmLocalGenerator *lg =
- this->Makefile->GetLocalGenerator()->GetGlobalGenerator()->
+ this->Makefile->GetGlobalGenerator()->
FindLocalGenerator(sd);
if (!lg)
{
diff --git a/Source/cmGetPropertyCommand.cxx b/Source/cmGetPropertyCommand.cxx
index 00dbdd3..250bd35 100644
--- a/Source/cmGetPropertyCommand.cxx
+++ b/Source/cmGetPropertyCommand.cxx
@@ -265,8 +265,7 @@ bool cmGetPropertyCommand::HandleDirectoryMode()
// Lookup the generator.
if(cmLocalGenerator* lg =
- (this->Makefile->GetLocalGenerator()
- ->GetGlobalGenerator()->FindLocalGenerator(dir)))
+ (this->Makefile->GetGlobalGenerator()->FindLocalGenerator(dir)))
{
// Use the makefile for the directory found.
mf = lg->GetMakefile();
diff --git a/Source/cmIncludeCommand.cxx b/Source/cmIncludeCommand.cxx
index ce04d3e..b94ad25 100644
--- a/Source/cmIncludeCommand.cxx
+++ b/Source/cmIncludeCommand.cxx
@@ -93,8 +93,7 @@ bool cmIncludeCommand
cmSystemTools::CollapseFullPath(fname,
this->Makefile->GetCurrentSourceDirectory());
- cmGlobalGenerator *gg = this->Makefile->GetLocalGenerator()
- ->GetGlobalGenerator();
+ cmGlobalGenerator *gg = this->Makefile->GetGlobalGenerator();
if (gg->IsExportedTargetsFile(fname_abs))
{
const char *modal = 0;
diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx
index f1e0eb8..78603c8 100644
--- a/Source/cmInstallCommand.cxx
+++ b/Source/cmInstallCommand.cxx
@@ -62,8 +62,7 @@ bool cmInstallCommand::InitialPass(std::vector<std::string> const& args,
}
// Enable the install target.
- this->Makefile->GetLocalGenerator()
- ->GetGlobalGenerator()->EnableInstallTarget();
+ this->Makefile->GetGlobalGenerator()->EnableInstallTarget();
this->DefaultComponentName = this->Makefile->GetSafeDefinition(
"CMAKE_INSTALL_DEFAULT_COMPONENT_NAME");
@@ -198,7 +197,7 @@ bool cmInstallCommand::HandleScriptMode(std::vector<std::string> const& args)
}
//Tell the global generator about any installation component names specified.
- this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
+ this->Makefile->GetGlobalGenerator()
->AddInstallComponent(component.c_str());
return true;
@@ -774,7 +773,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
te->HeaderGenerator = publicHeaderGenerator;
te->LibraryGenerator = libraryGenerator;
te->RuntimeGenerator = runtimeGenerator;
- this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
+ this->Makefile->GetGlobalGenerator()
->GetExportSets()[exports.GetString()]->AddTargetExport(te);
te->InterfaceIncludeDirectories =
@@ -786,43 +785,42 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
// specified
if (installsArchive)
{
- this->Makefile->GetLocalGenerator()->
- GetGlobalGenerator()
+ this->Makefile->GetGlobalGenerator()
->AddInstallComponent(archiveArgs.GetComponent().c_str());
}
if (installsLibrary)
{
- this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
+ this->Makefile->GetGlobalGenerator()
->AddInstallComponent(libraryArgs.GetComponent().c_str());
}
if (installsRuntime)
{
- this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
+ this->Makefile->GetGlobalGenerator()
->AddInstallComponent(runtimeArgs.GetComponent().c_str());
}
if (installsFramework)
{
- this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
+ this->Makefile->GetGlobalGenerator()
->AddInstallComponent(frameworkArgs.GetComponent().c_str());
}
if (installsBundle)
{
- this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
+ this->Makefile->GetGlobalGenerator()
->AddInstallComponent(bundleArgs.GetComponent().c_str());
}
if (installsPrivateHeader)
{
- this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
+ this->Makefile->GetGlobalGenerator()
->AddInstallComponent(privateHeaderArgs.GetComponent().c_str());
}
if (installsPublicHeader)
{
- this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
+ this->Makefile->GetGlobalGenerator()
->AddInstallComponent(publicHeaderArgs.GetComponent().c_str());
}
if (installsResource)
{
- this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
+ this->Makefile->GetGlobalGenerator()
->AddInstallComponent(resourceArgs.GetComponent().c_str());
}
@@ -890,7 +888,7 @@ bool cmInstallCommand::HandleFilesMode(std::vector<std::string> const& args)
CreateInstallFilesGenerator(this->Makefile, absFiles, ica, programs));
//Tell the global generator about any installation component names specified.
- this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
+ this->Makefile->GetGlobalGenerator()
->AddInstallComponent(ica.GetComponent().c_str());
return true;
@@ -1235,7 +1233,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args)
// Tell the global generator about any installation component names
// specified.
- this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
+ this->Makefile->GetGlobalGenerator()
->AddInstallComponent(component.c_str());
return true;
@@ -1322,8 +1320,8 @@ bool cmInstallCommand::HandleExportMode(std::vector<std::string> const& args)
}
}
- cmExportSet *exportSet = this->Makefile->GetLocalGenerator()
- ->GetGlobalGenerator()->GetExportSets()[exp.GetString()];
+ cmExportSet *exportSet = this->Makefile->GetGlobalGenerator()
+ ->GetExportSets()[exp.GetString()];
if (exportOld.IsEnabled())
{
for(std::vector<cmTargetExport*>::const_iterator
diff --git a/Source/cmInstallFilesCommand.cxx b/Source/cmInstallFilesCommand.cxx
index 1fe435c..508c373 100644
--- a/Source/cmInstallFilesCommand.cxx
+++ b/Source/cmInstallFilesCommand.cxx
@@ -24,8 +24,7 @@ bool cmInstallFilesCommand
}
// Enable the install target.
- this->Makefile->GetLocalGenerator()
- ->GetGlobalGenerator()->EnableInstallTarget();
+ this->Makefile->GetGlobalGenerator()->EnableInstallTarget();
this->Destination = args[0];
@@ -48,7 +47,7 @@ bool cmInstallFilesCommand
args.begin() + 1, args.end());
}
- this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
+ this->Makefile->GetGlobalGenerator()
->AddInstallComponent(this->Makefile->GetSafeDefinition(
"CMAKE_INSTALL_DEFAULT_COMPONENT_NAME"));
diff --git a/Source/cmInstallProgramsCommand.cxx b/Source/cmInstallProgramsCommand.cxx
index 4899b95..be8096c 100644
--- a/Source/cmInstallProgramsCommand.cxx
+++ b/Source/cmInstallProgramsCommand.cxx
@@ -22,14 +22,13 @@ bool cmInstallProgramsCommand
}
// Enable the install target.
- this->Makefile->GetLocalGenerator()
- ->GetGlobalGenerator()->EnableInstallTarget();
+ this->Makefile->GetGlobalGenerator()->EnableInstallTarget();
this->Destination = args[0];
this->FinalArgs.insert(this->FinalArgs.end(), args.begin() + 1, args.end());
- this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
+ this->Makefile->GetGlobalGenerator()
->AddInstallComponent(this->Makefile->GetSafeDefinition(
"CMAKE_INSTALL_DEFAULT_COMPONENT_NAME"));
diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx
index 11125d3..082a78c 100644
--- a/Source/cmInstallTargetGenerator.cxx
+++ b/Source/cmInstallTargetGenerator.cxx
@@ -728,8 +728,7 @@ cmInstallTargetGenerator
i != oldRuntimeDirs.end(); ++i)
{
std::string runpath =
- mf->GetLocalGenerator()->
- GetGlobalGenerator()->ExpandCFGIntDir(*i, config);
+ mf->GetGlobalGenerator()->ExpandCFGIntDir(*i, config);
if(runpaths.find(runpath) == runpaths.end())
{
@@ -745,8 +744,7 @@ cmInstallTargetGenerator
i != newRuntimeDirs.end(); ++i)
{
std::string runpath =
- mf->GetLocalGenerator()->
- GetGlobalGenerator()->ExpandCFGIntDir(*i, config);
+ mf->GetGlobalGenerator()->ExpandCFGIntDir(*i, config);
if(runpaths.find(runpath) == runpaths.end())
{
diff --git a/Source/cmInstallTargetsCommand.cxx b/Source/cmInstallTargetsCommand.cxx
index b738844..7e7b848 100644
--- a/Source/cmInstallTargetsCommand.cxx
+++ b/Source/cmInstallTargetsCommand.cxx
@@ -22,8 +22,7 @@ bool cmInstallTargetsCommand
}
// Enable the install target.
- this->Makefile->GetLocalGenerator()
- ->GetGlobalGenerator()->EnableInstallTarget();
+ this->Makefile->GetGlobalGenerator()->EnableInstallTarget();
cmTargets &tgts = this->Makefile->GetTargets();
std::vector<std::string>::const_iterator s = args.begin();
@@ -57,7 +56,7 @@ bool cmInstallTargetsCommand
}
}
- this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
+ this->Makefile->GetGlobalGenerator()
->AddInstallComponent(this->Makefile->GetSafeDefinition(
"CMAKE_INSTALL_DEFAULT_COMPONENT_NAME"));
diff --git a/Source/cmLocalUnixMakefileGenerator3.h b/Source/cmLocalUnixMakefileGenerator3.h
index 9f83b86..aee22ec 100644
--- a/Source/cmLocalUnixMakefileGenerator3.h
+++ b/Source/cmLocalUnixMakefileGenerator3.h
@@ -95,6 +95,7 @@ public:
* Set to true if the make tool being used is MinGW Make.
*/
void SetMinGWMake(bool v) {this->MinGWMake = v;}
+ bool IsMinGWMake() const { return this->MinGWMake; }
/**
* Set to true if the make tool being used is NMake.
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 3befbdd..82add86 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -53,12 +53,7 @@ public:
void PushDefinitions()
{
- cmDefinitions* parent = 0;
- if (!this->VarStack.empty())
- {
- parent = &this->VarStack.back();
- }
- this->VarStack.push_back(cmDefinitions(parent));
+ this->VarStack.push_back(cmDefinitions());
}
void InitializeDefinitions(cmMakefile* parent)
@@ -70,7 +65,8 @@ public:
const char* GetDefinition(std::string const& name)
{
- return this->VarStack.back().Get(name);
+ return cmDefinitions::Get(name, this->VarStack.rbegin(),
+ this->VarStack.rend());
}
void SetDefinition(std::string const& name, std::string const& value)
@@ -182,6 +178,9 @@ cmMakefile::cmMakefile(cmLocalGenerator* localGenerator)
this->WarnUnused = false;
this->CheckSystemVars = false;
+ this->GeneratingBuildSystem = false;
+ this->SuppressWatches = false;
+
// Setup the default include file regular expression (match everything).
this->IncludeFileRegularExpression = "^.*$";
// Setup the default include complaint regular expression (match nothing).
@@ -216,15 +215,7 @@ cmMakefile::cmMakefile(cmLocalGenerator* localGenerator)
this->LocalGenerator = localGenerator;
this->AddDefaultDefinitions();
- this->Initialize();
- this->GeneratingBuildSystem = false;
-
- this->SuppressWatches = false;
-}
-//----------------------------------------------------------------------------
-void cmMakefile::Initialize()
-{
this->cmDefineRegex.compile("#cmakedefine[ \t]+([A-Za-z_0-9]*)");
this->cmDefine01Regex.compile("#cmakedefine01[ \t]+([A-Za-z_0-9]*)");
this->cmAtVarRegex.compile("(@[A-Za-z_0-9/.+-]+@)");
@@ -1012,7 +1003,7 @@ cmMakefile::AddCustomCommandToOutput(const std::vector<std::string>& outputs,
// Generate a rule file if the main dependency is not available.
if(!file)
{
- cmGlobalGenerator* gg = this->LocalGenerator->GetGlobalGenerator();
+ cmGlobalGenerator* gg = this->GetGlobalGenerator();
// Construct a rule file associated with the first output produced.
std::string outName = gg->GenerateRuleFile(outputs[0]);
@@ -1418,8 +1409,7 @@ bool cmMakefile::ParseDefineFlag(std::string const& def, bool remove)
// VS6 IDE does not support definition values with spaces in
// combination with '"', '$', or ';'.
- if((this->LocalGenerator->GetGlobalGenerator()->GetName() ==
- "Visual Studio 6") &&
+ if((this->GetGlobalGenerator()->GetName() == "Visual Studio 6") &&
(def.find(" ") != def.npos && def.find_first_of("\"$;") != def.npos))
{
return false;
@@ -1503,8 +1493,7 @@ void cmMakefile::AddLinkLibraryForTarget(const std::string& target,
cmTargets::iterator i = this->Targets.find(target);
if ( i != this->Targets.end())
{
- cmTarget* tgt =
- this->GetCMakeInstance()->GetGlobalGenerator()->FindTarget(lib);
+ cmTarget* tgt = this->GetGlobalGenerator()->FindTarget(lib);
if(tgt)
{
// if it is not a static or shared library then you can not link to it
@@ -1696,10 +1685,9 @@ void cmMakefile::AddSubDirectory(const std::string& srcPath,
}
// create a new local generator and set its parent
- cmLocalGenerator *lg2 =
- this->LocalGenerator->GetGlobalGenerator()
+ cmLocalGenerator *lg2 = this->GetGlobalGenerator()
->CreateLocalGenerator(this->LocalGenerator);
- this->LocalGenerator->GetGlobalGenerator()->AddLocalGenerator(lg2);
+ this->GetGlobalGenerator()->AddLocalGenerator(lg2);
// set the subdirs start dirs
lg2->GetMakefile()->SetCurrentSourceDirectory(srcPath);
@@ -2015,7 +2003,7 @@ void cmMakefile::AddGlobalLinkInformation(const std::string& name,
void cmMakefile::AddAlias(const std::string& lname, cmTarget *tgt)
{
this->AliasTargets[lname] = tgt;
- this->LocalGenerator->GetGlobalGenerator()->AddAlias(lname, tgt);
+ this->GetGlobalGenerator()->AddAlias(lname, tgt);
}
cmTarget* cmMakefile::AddLibrary(const std::string& lname,
@@ -2072,7 +2060,7 @@ cmMakefile::AddNewTarget(cmTarget::TargetType type, const std::string& name)
cmTarget& target = it->second;
target.SetType(type, name);
target.SetMakefile(this);
- this->LocalGenerator->GetGlobalGenerator()->AddTarget(&it->second);
+ this->GetGlobalGenerator()->AddTarget(&it->second);
return &it->second;
}
@@ -2216,7 +2204,7 @@ void cmMakefile::AddSourceGroup(const std::vector<std::string>& name,
}
// build the whole source group path
const char* fullname = sg->GetFullName();
- cmGlobalGenerator* gg = this->LocalGenerator->GetGlobalGenerator();
+ cmGlobalGenerator* gg = this->GetGlobalGenerator();
if(strlen(fullname))
{
std::string guidName = "SG_Filter_";
@@ -3170,7 +3158,7 @@ std::string
cmMakefile::GetConfigurations(std::vector<std::string>& configs,
bool single) const
{
- if(this->LocalGenerator->GetGlobalGenerator()->IsMultiConfig())
+ if(this->GetGlobalGenerator()->IsMultiConfig())
{
if(const char* configTypes =
this->GetDefinition("CMAKE_CONFIGURATION_TYPES"))
@@ -3541,10 +3529,8 @@ void cmMakefile::EnableLanguage(std::vector<std::string> const & lang,
bool optional)
{
this->AddDefinition("CMAKE_CFG_INTDIR",
- this->LocalGenerator->GetGlobalGenerator()
- ->GetCMakeCFGIntDir());
- this->LocalGenerator->GetGlobalGenerator()->EnableLanguage(lang, this,
- optional);
+ this->GetGlobalGenerator()->GetCMakeCFGIntDir());
+ this->GetGlobalGenerator()->EnableLanguage(lang, this, optional);
}
int cmMakefile::TryCompile(const std::string& srcdir,
@@ -3574,7 +3560,7 @@ int cmMakefile::TryCompile(const std::string& srcdir,
cmake cm;
cm.SetIsInTryCompile(true);
cmGlobalGenerator *gg = cm.CreateGlobalGenerator
- (this->LocalGenerator->GetGlobalGenerator()->GetName());
+ (this->GetGlobalGenerator()->GetName());
if (!gg)
{
cmSystemTools::Error(
@@ -3635,8 +3621,7 @@ int cmMakefile::TryCompile(const std::string& srcdir,
cm.SetCacheArgs(*cmakeArgs);
}
// to save time we pass the EnableLanguage info directly
- gg->EnableLanguagesFromGenerator
- (this->LocalGenerator->GetGlobalGenerator(), this);
+ gg->EnableLanguagesFromGenerator(this->GetGlobalGenerator(), this);
if(this->IsOn("CMAKE_SUPPRESS_DEVELOPER_WARNINGS"))
{
cm.AddCacheEntry("CMAKE_SUPPRESS_DEVELOPER_WARNINGS",
@@ -3668,13 +3653,12 @@ int cmMakefile::TryCompile(const std::string& srcdir,
}
// finally call the generator to actually build the resulting project
- int ret =
- this->LocalGenerator->GetGlobalGenerator()->TryCompile(srcdir,bindir,
- projectName,
- targetName,
- fast,
- output,
- this);
+ int ret = this->GetGlobalGenerator()->TryCompile(srcdir,bindir,
+ projectName,
+ targetName,
+ fast,
+ output,
+ this);
cmSystemTools::ChangeDirectory(cwd);
this->Internal->IsSourceFileTryCompile = false;
@@ -3688,11 +3672,12 @@ bool cmMakefile::GetIsSourceFileTryCompile() const
cmake *cmMakefile::GetCMakeInstance() const
{
- if ( this->LocalGenerator && this->LocalGenerator->GetGlobalGenerator() )
- {
- return this->LocalGenerator->GetGlobalGenerator()->GetCMakeInstance();
- }
- return 0;
+ return this->GetGlobalGenerator()->GetCMakeInstance();
+}
+
+cmGlobalGenerator* cmMakefile::GetGlobalGenerator() const
+{
+ return this->LocalGenerator->GetGlobalGenerator();
}
#ifdef CMAKE_BUILD_WITH_CMAKE
@@ -3726,8 +3711,7 @@ cmState *cmMakefile::GetState() const
void cmMakefile::DisplayStatus(const char* message, float s) const
{
- cmake* cm = this->GetLocalGenerator()->GetGlobalGenerator()
- ->GetCMakeInstance();
+ cmake* cm = this->GetCMakeInstance();
if (cm->GetWorkingMode() == cmake::FIND_PACKAGE_MODE)
{
// don't output any STATUS message in FIND_PACKAGE_MODE, since they will
@@ -4397,16 +4381,14 @@ void cmMakefile::PushScope()
this->PushLoopBlockBarrier();
#if defined(CMAKE_BUILD_WITH_CMAKE)
- this->GetLocalGenerator()->GetGlobalGenerator()->
- GetFileLockPool().PushFunctionScope();
+ this->GetGlobalGenerator()->GetFileLockPool().PushFunctionScope();
#endif
}
void cmMakefile::PopScope()
{
#if defined(CMAKE_BUILD_WITH_CMAKE)
- this->GetLocalGenerator()->GetGlobalGenerator()->
- GetFileLockPool().PopFunctionScope();
+ this->GetGlobalGenerator()->GetFileLockPool().PopFunctionScope();
#endif
this->PopLoopBlockBarrier();
@@ -4469,7 +4451,7 @@ cmMakefile::AddImportedTarget(const std::string& name,
this->ImportedTargets[name] = target.get();
if(global)
{
- this->LocalGenerator->GetGlobalGenerator()->AddTarget(target.get());
+ this->GetGlobalGenerator()->AddTarget(target.get());
}
// Transfer ownership to this cmMakefile object.
@@ -4497,8 +4479,7 @@ cmTarget* cmMakefile::FindTargetToUse(const std::string& name,
}
// Look for a target built in this project.
- return this->LocalGenerator->GetGlobalGenerator()->FindTarget(name,
- excludeAliases);
+ return this->GetGlobalGenerator()->FindTarget(name, excludeAliases);
}
//----------------------------------------------------------------------------
@@ -4506,8 +4487,7 @@ bool cmMakefile::IsAlias(const std::string& name) const
{
if (this->AliasTargets.find(name) != this->AliasTargets.end())
return true;
- return this->GetLocalGenerator()->GetGlobalGenerator()->IsAlias(
- name);
+ return this->GetGlobalGenerator()->IsAlias(name);
}
//----------------------------------------------------------------------------
@@ -4516,7 +4496,7 @@ cmMakefile::FindGeneratorTargetToUse(const std::string& name) const
{
if (cmTarget *t = this->FindTargetToUse(name))
{
- return this->LocalGenerator->GetGlobalGenerator()->GetGeneratorTarget(t);
+ return this->GetGlobalGenerator()->GetGeneratorTarget(t);
}
return 0;
}
@@ -4569,8 +4549,7 @@ bool cmMakefile::EnforceUniqueName(std::string const& name, std::string& msg,
// The conflict is with a non-imported target.
// Allow this if the user has requested support.
- cmake* cm =
- this->LocalGenerator->GetGlobalGenerator()->GetCMakeInstance();
+ cmake* cm = this->GetCMakeInstance();
if(isCustom && existing->GetType() == cmTarget::UTILITY &&
this != existing->GetMakefile() &&
cm->GetState()
@@ -4622,7 +4601,7 @@ bool cmMakefile::EnforceUniqueDir(const std::string& srcPath,
const std::string& binPath) const
{
// Make sure the binary directory is unique.
- cmGlobalGenerator* gg = this->LocalGenerator->GetGlobalGenerator();
+ cmGlobalGenerator* gg = this->GetGlobalGenerator();
if(gg->BinaryDirectoryIsNew(binPath))
{
return true;
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 8968e81..99f2544 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -712,6 +712,7 @@ public:
* Get the instance
*/
cmake *GetCMakeInstance() const;
+ cmGlobalGenerator* GetGlobalGenerator() const;
/**
* Get all the source files this makefile knows about
@@ -918,7 +919,6 @@ protected:
private:
cmMakefile(const cmMakefile& mf);
cmMakefile& operator=(const cmMakefile& mf);
- void Initialize();
cmState::Snapshot StateSnapshot;
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index d28dde1..a4dad1e 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -24,6 +24,7 @@
#include "cmComputeLinkInformation.h"
#include "cmCustomCommandGenerator.h"
#include "cmGeneratorExpression.h"
+#include "cmAlgorithms.h"
#include "cmMakefileExecutableTargetGenerator.h"
#include "cmMakefileLibraryTargetGenerator.h"
@@ -681,6 +682,15 @@ cmMakefileTargetGenerator
this->Convert(targetFullPathCompilePDB,
cmLocalGenerator::START_OUTPUT,
cmLocalGenerator::SHELL);
+
+ if (this->LocalGenerator->IsMinGWMake() &&
+ cmHasLiteralSuffix(targetOutPathCompilePDB, "\\"))
+ {
+ // mingw32-make incorrectly interprets 'a\ b c' as 'a b' and 'c'
+ // (but 'a\ b "c"' as 'a\', 'b', and 'c'!). Workaround this by
+ // avoiding a trailing backslash in the argument.
+ targetOutPathCompilePDB[targetOutPathCompilePDB.size()-1] = '/';
+ }
}
cmLocalGenerator::RuleVariables vars;
vars.RuleLauncher = "RULE_LAUNCH_COMPILE";
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx
index 91b2b27..457de11 100644
--- a/Source/cmQtAutoGenerators.cxx
+++ b/Source/cmQtAutoGenerators.cxx
@@ -396,7 +396,7 @@ bool cmQtAutoGenerators::InitializeAutogenTarget(cmTarget* target)
std::vector<std::string> rcc_output;
bool const isNinja =
- makefile->GetLocalGenerator()->GetGlobalGenerator()->GetName() == "Ninja";
+ makefile->GetGlobalGenerator()->GetName() == "Ninja";
if(isNinja
#if defined(_WIN32) && !defined(__CYGWIN__)
|| usePRE_BUILD
@@ -524,9 +524,8 @@ static void GetCompileDefinitionsAndDirectories(cmTarget const* target,
cmMakefile* makefile = target->GetMakefile();
cmLocalGenerator* localGen = makefile->GetLocalGenerator();
std::vector<std::string> includeDirs;
- cmGeneratorTarget *gtgt = target->GetMakefile()->GetLocalGenerator()
- ->GetGlobalGenerator()
- ->GetGeneratorTarget(target);
+ cmGeneratorTarget *gtgt = localGen->GetGlobalGenerator()
+ ->GetGeneratorTarget(target);
// Get the include dirs for this target, without stripping the implicit
// include dirs off, see http://public.kitware.com/Bug/view.php?id=13667
localGen->GetIncludeDirectories(includeDirs, gtgt, "CXX", config, false);
diff --git a/Source/cmSetPropertyCommand.cxx b/Source/cmSetPropertyCommand.cxx
index 35262b6..31e460f 100644
--- a/Source/cmSetPropertyCommand.cxx
+++ b/Source/cmSetPropertyCommand.cxx
@@ -207,8 +207,7 @@ bool cmSetPropertyCommand::HandleDirectoryMode()
// Lookup the generator.
if(cmLocalGenerator* lg =
- (this->Makefile->GetLocalGenerator()
- ->GetGlobalGenerator()->FindLocalGenerator(dir)))
+ this->Makefile->GetGlobalGenerator()->FindLocalGenerator(dir))
{
// Use the makefile for the directory found.
mf = lg->GetMakefile();
diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx
index cdd04ed..724ab39 100644
--- a/Source/cmSourceFile.cxx
+++ b/Source/cmSourceFile.cxx
@@ -282,7 +282,7 @@ void cmSourceFile::CheckLanguage(std::string const& ext)
{
// Try to identify the source file language from the extension.
cmMakefile const* mf = this->Location.GetMakefile();
- cmGlobalGenerator* gg = mf->GetLocalGenerator()->GetGlobalGenerator();
+ cmGlobalGenerator* gg = mf->GetGlobalGenerator();
std::string l = gg->GetLanguageFromExtension(ext.c_str());
if(!l.empty())
{
diff --git a/Source/cmSourceFileLocation.cxx b/Source/cmSourceFileLocation.cxx
index a0eba5e..4a87cc2 100644
--- a/Source/cmSourceFileLocation.cxx
+++ b/Source/cmSourceFileLocation.cxx
@@ -120,8 +120,7 @@ void cmSourceFileLocation::UpdateExtension(const std::string& name)
if(!ext.empty()) { ext = ext.substr(1); }
// The global generator checks extensions of enabled languages.
- cmGlobalGenerator* gg =
- this->Makefile->GetLocalGenerator()->GetGlobalGenerator();
+ cmGlobalGenerator* gg = this->Makefile->GetGlobalGenerator();
cmMakefile const* mf = this->Makefile;
const std::vector<std::string>& srcExts = mf->GetSourceExtensions();
const std::vector<std::string>& hdrExts = mf->GetHeaderExtensions();
diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index 24cbc4a..67a2274 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -22,7 +22,6 @@ cmState::cmState(cmake* cm)
: CMakeInstance(cm),
IsInTryCompile(false)
{
- this->CreateSnapshot(Snapshot());
this->Initialize();
}
@@ -194,8 +193,12 @@ void cmState::RemoveCacheEntryProperty(std::string const& key,
void cmState::Initialize()
{
this->GlobalProperties.clear();
-
this->PropertyDefinitions.clear();
+ this->Locations.clear();
+ this->OutputLocations.clear();
+ this->ParentPositions.clear();
+
+ this->CreateSnapshot(Snapshot());
this->DefineProperty
("RULE_LAUNCH_COMPILE", cmProperty::DIRECTORY,
"", "", true);
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 8d1367e..8a8c163 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -511,7 +511,7 @@ void cmTarget::FinishConfigure()
#if defined(_WIN32) && !defined(__CYGWIN__)
// Do old-style link dependency analysis only for CM_USE_OLD_VS6.
- if(this->Makefile->GetLocalGenerator()->GetGlobalGenerator()->IsForVS6())
+ if(this->Makefile->GetGlobalGenerator()->IsForVS6())
{
this->AnalyzeLibDependenciesForVS6(*this->Makefile);
}
@@ -847,8 +847,7 @@ cmTarget::GetConfigCommonSourceFiles(std::vector<cmSourceFile*>& files) const
std::ostringstream e;
e << "Target \"" << this->Name << "\" has source files which vary by "
"configuration. This is not supported by the \""
- << this->Makefile->GetLocalGenerator()
- ->GetGlobalGenerator()->GetName()
+ << this->Makefile->GetGlobalGenerator()->GetName()
<< "\" generator.\n"
"Config \"" << firstConfig << "\":\n"
" " << firstConfigFiles << "\n"
@@ -1187,7 +1186,7 @@ void cmTarget::ClearDependencyInformation( cmMakefile& mf,
//----------------------------------------------------------------------------
bool cmTarget::NameResolvesToFramework(const std::string& libname) const
{
- return this->Makefile->GetLocalGenerator()->GetGlobalGenerator()->
+ return this->Makefile->GetGlobalGenerator()->
NameResolvesToFramework(libname);
}
@@ -3322,7 +3321,7 @@ public:
cmTargetSelectLinker(cmTarget const* target): Preference(0), Target(target)
{
this->Makefile = this->Target->GetMakefile();
- this->GG = this->Makefile->GetLocalGenerator()->GetGlobalGenerator();
+ this->GG = this->Makefile->GetGlobalGenerator();
}
void Consider(const std::string& lang)
{
@@ -3757,7 +3756,7 @@ bool cmTarget::MacOSXRpathInstallNameDirDefault() const
if(cmp0042 == cmPolicies::WARN)
{
- this->Makefile->GetLocalGenerator()->GetGlobalGenerator()->
+ this->Makefile->GetGlobalGenerator()->
AddCMP0042WarnTarget(this->GetName());
}
@@ -4544,7 +4543,7 @@ bool cmTarget::ComputeOutputDir(const std::string& config,
"CMAKE_XCODE_EFFECTIVE_PLATFORMS");
std::string suffix =
usesDefaultOutputDir && platforms ? "$(EFFECTIVE_PLATFORM_NAME)" : "";
- this->Makefile->GetLocalGenerator()->GetGlobalGenerator()->
+ this->Makefile->GetGlobalGenerator()->
AppendDirectoryForConfig("/", conf, suffix, out);
}
@@ -4606,7 +4605,7 @@ bool cmTarget::ComputePDBOutputDir(const std::string& kind,
// The generator may add the configuration's subdirectory.
if(!conf.empty())
{
- this->Makefile->GetLocalGenerator()->GetGlobalGenerator()->
+ this->Makefile->GetGlobalGenerator()->
AppendDirectoryForConfig("/", conf, "", out);
}
return true;
@@ -5269,8 +5268,7 @@ void cmTarget::GetLanguages(std::set<std::string>& languages,
}
else
{
- cmGeneratorTarget* gt = this->Makefile->GetLocalGenerator()
- ->GetGlobalGenerator()
+ cmGeneratorTarget* gt = this->Makefile->GetGlobalGenerator()
->GetGeneratorTarget(this);
gt->GetExternalObjects(externalObjects, config);
for(std::vector<cmSourceFile const*>::const_iterator