summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/cmGeneratorExpressionEvaluator.cxx5
-rw-r--r--Source/cmMakefile.cxx35
3 files changed, 35 insertions, 7 deletions
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index be882a5..ff80e2e 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 11)
-set(CMake_VERSION_TWEAK 20130828)
+set(CMake_VERSION_TWEAK 20130829)
#set(CMake_VERSION_RC 1)
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index e0c8c9e..abe4e70 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -574,14 +574,15 @@ static const struct ConfigurationTestNode : public cmGeneratorExpressionNode
// Check if there is a proper config mapping for the tested config.
std::vector<std::string> mappedConfigs;
std::string mapProp = "MAP_IMPORTED_CONFIG_";
- mapProp += context->Config;
+ mapProp += cmSystemTools::UpperCase(context->Config);
if(const char* mapValue =
context->CurrentTarget->GetProperty(mapProp.c_str()))
{
cmSystemTools::ExpandListArgument(cmSystemTools::UpperCase(mapValue),
mappedConfigs);
return std::find(mappedConfigs.begin(), mappedConfigs.end(),
- context->Config) != mappedConfigs.end() ? "1" : "0";
+ cmSystemTools::UpperCase(parameters.front()))
+ != mappedConfigs.end() ? "1" : "0";
}
}
}
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 57b86fd..4baf345 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -816,6 +816,18 @@ bool cmMakefile::NeedBackwardsCompatibility(unsigned int major,
}
}
+
+namespace
+{
+ struct file_exists
+ {
+ bool operator()(const std::string& path) const
+ {
+ return cmSystemTools::FileExists(path.c_str());
+ }
+ };
+}
+
void cmMakefile::FinalPass()
{
// do all the variable expansions here
@@ -829,6 +841,20 @@ void cmMakefile::FinalPass()
(*i)->FinalPass();
}
+ //go through all configured files and see which ones still exist.
+ //we don't want cmake to re-run if a configured file is created and deleted
+ //during processing as that would make it a transient file that can't
+ //influence the build process
+
+ //remove_if will move all items that don't have a valid file name to the
+ //back of the vector
+ std::vector<std::string>::iterator new_end = std::remove_if(
+ this->OutputFiles.begin(),
+ this->OutputFiles.end(),
+ file_exists() );
+ //we just have to erase all items at the back
+ this->OutputFiles.erase(new_end, this->OutputFiles.end() );
+
}
// Generate the output file
@@ -3419,11 +3445,12 @@ int cmMakefile::ConfigureFile(const char* infile, const char* outfile,
std::string sinfile = infile;
this->AddCMakeDependFile(sinfile);
cmSystemTools::ConvertToUnixSlashes(soutfile);
+
// Re-generate if non-temporary outputs are missing.
- if(soutfile.find("CMakeTmp") == soutfile.npos)
- {
- this->AddCMakeOutputFile(soutfile);
- }
+ //when we finalize the configuration we will remove all
+ //output files that now don't exist.
+ this->AddCMakeOutputFile(soutfile);
+
mode_t perm = 0;
cmSystemTools::GetPermissions(sinfile.c_str(), perm);
std::string::size_type pos = soutfile.rfind('/');