summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/cmGlobalGenerator.cxx24
-rw-r--r--Source/cmGlobalGenerator.h1
-rw-r--r--Source/cmNinjaTargetGenerator.cxx13
-rw-r--r--Source/cmcmd.cxx2
5 files changed, 31 insertions, 11 deletions
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index b68fdaf..4196c9b 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -2,5 +2,5 @@
set(CMake_VERSION_MAJOR 2)
set(CMake_VERSION_MINOR 8)
set(CMake_VERSION_PATCH 12)
-set(CMake_VERSION_TWEAK 20131105)
+set(CMake_VERSION_TWEAK 20131106)
#set(CMake_VERSION_RC 1)
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index f7c4b94..c308f4b 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1059,6 +1059,8 @@ void cmGlobalGenerator::Generate()
return;
}
+ this->FinalizeTargetCompileDefinitions();
+
// Iterate through all targets and set up automoc for those which have
// the AUTOMOC, AUTOUIC or AUTORCC property set
this->CreateQtAutoGeneratorsTargets();
@@ -1262,13 +1264,11 @@ void cmGlobalGenerator::CreateQtAutoGeneratorsTargets()
}
//----------------------------------------------------------------------------
-void cmGlobalGenerator::CreateGeneratorTargets()
+void cmGlobalGenerator::FinalizeTargetCompileDefinitions()
{
// Construct per-target generator information.
for(unsigned int i=0; i < this->LocalGenerators.size(); ++i)
{
- cmGeneratorTargetsType generatorTargets;
-
cmMakefile *mf = this->LocalGenerators[i]->GetMakefile();
const std::vector<cmValueWithOrigin> noconfig_compile_definitions =
@@ -1283,7 +1283,6 @@ void cmGlobalGenerator::CreateGeneratorTargets()
{
cmTarget* t = &ti->second;
- {
for (std::vector<cmValueWithOrigin>::const_iterator it
= noconfig_compile_definitions.begin();
it != noconfig_compile_definitions.end(); ++it)
@@ -1300,7 +1299,24 @@ void cmGlobalGenerator::CreateGeneratorTargets()
mf->GetProperty(defPropName.c_str()));
}
}
+ }
+}
+
+//----------------------------------------------------------------------------
+void cmGlobalGenerator::CreateGeneratorTargets()
+{
+ // Construct per-target generator information.
+ for(unsigned int i=0; i < this->LocalGenerators.size(); ++i)
+ {
+ cmGeneratorTargetsType generatorTargets;
+
+ cmMakefile *mf = this->LocalGenerators[i]->GetMakefile();
+ cmTargets& targets = mf->GetTargets();
+ for(cmTargets::iterator ti = targets.begin();
+ ti != targets.end(); ++ti)
+ {
+ cmTarget* t = &ti->second;
cmGeneratorTarget* gt = new cmGeneratorTarget(t);
this->GeneratorTargets[t] = gt;
generatorTargets[t] = gt;
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index 4529060..e01f790 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -395,6 +395,7 @@ private:
void WriteSummary();
void WriteSummary(cmTarget* target);
+ void FinalizeTargetCompileDefinitions();
virtual void PrintCompilerAdvice(std::ostream& os, std::string lang,
const char* envVar);
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index a6f8159..26eadbe 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -398,11 +398,14 @@ cmNinjaTargetGenerator
depfile = "$DEP_FILE";
const std::string flagsName = "CMAKE_DEPFILE_FLAGS_" + lang;
std::string depfileFlags = mf->GetSafeDefinition(flagsName.c_str());
- cmSystemTools::ReplaceString(depfileFlags, "<DEPFILE>", "$DEP_FILE");
- cmSystemTools::ReplaceString(depfileFlags, "<OBJECT>", "$out");
- cmSystemTools::ReplaceString(depfileFlags, "<CMAKE_C_COMPILER>",
- mf->GetDefinition("CMAKE_C_COMPILER"));
- flags += " " + depfileFlags;
+ if (!depfileFlags.empty())
+ {
+ cmSystemTools::ReplaceString(depfileFlags, "<DEPFILE>", "$DEP_FILE");
+ cmSystemTools::ReplaceString(depfileFlags, "<OBJECT>", "$out");
+ cmSystemTools::ReplaceString(depfileFlags, "<CMAKE_C_COMPILER>",
+ mf->GetDefinition("CMAKE_C_COMPILER"));
+ flags += " " + depfileFlags;
+ }
}
vars.Flags = flags.c_str();
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx
index 26251b3..d4f464c 100644
--- a/Source/cmcmd.cxx
+++ b/Source/cmcmd.cxx
@@ -632,7 +632,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args)
{
return cmcmd::ExecuteEchoColor(args);
}
- else if (args[1] == "cmake_autogen")
+ else if (args[1] == "cmake_autogen" && args.size() >= 4)
{
cmQtAutoGenerators autogen;
const char *config = args[3].empty() ? 0 : args[3].c_str();