[Cmake-commits] CMake branch, next, updated. v2.8.10.2-1579-g5ce8375
Stephen Kelly
steveire at gmail.com
Sun Jan 13 03:58:29 EST 2013
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 5ce8375cb4ff8f729b9b9a99626dfe5e38fe2837 (commit)
via 6e4e638f048e4f066784ec03719e9795b35af163 (commit)
via 3e43841b6239450185f1a83a30e7be6b48d7d230 (commit)
via bec264cc9d79d7f05dd0f332c48b8a890380d85d (commit)
via f3053ddfc45cb02a3f9d6d03a58fc085c0965cf7 (commit)
via 6df033354365281098354f6cf98d070498d6ff8d (commit)
via 3367d0cc7fe50e6b6fc06c85c8c38c683c1d3805 (commit)
from ae4b7dbfab672dcf7be8c4439b340637789873a3 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5ce8375cb4ff8f729b9b9a99626dfe5e38fe2837
commit 5ce8375cb4ff8f729b9b9a99626dfe5e38fe2837
Merge: ae4b7db 6e4e638
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jan 13 03:58:28 2013 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sun Jan 13 03:58:28 2013 -0500
Merge topic 'export-cleanups' into next
6e4e638 Move the exported check for file existence.
3e43841 Move the exported check for dependencies of targets
bec264c Only generate one check per missing target.
f3053dd Don't write a comment in the export file without the code.
6df0333 Strip consecutive semicolons when preprocessing genex strings.
3367d0c CMake Nightly Date Stamp
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6e4e638f048e4f066784ec03719e9795b35af163
commit 6e4e638f048e4f066784ec03719e9795b35af163
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jan 13 09:48:45 2013 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jan 13 09:50:29 2013 +0100
Move the exported check for file existence.
Check only once, in the Config.cmake file, instead of once in each
Config-<cfg>.cmake file.
diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx
index bffa2b6..7eed5ab 100644
--- a/Source/cmExportInstallFileGenerator.cxx
+++ b/Source/cmExportInstallFileGenerator.cxx
@@ -104,6 +104,8 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os)
<< "ENDFOREACH(f)\n"
<< "\n";
+ this->GenerateImportedFileCheckLoop(os);
+
// Generate an import file for each configuration.
bool result = true;
for(std::vector<std::string>::const_iterator
@@ -249,8 +251,6 @@ cmExportInstallFileGenerator
}
}
- this->GenerateImportedFileCheckLoop(os);
-
// Cleanup the import prefix variable.
if(!this->ImportPrefix.empty())
{
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3e43841b6239450185f1a83a30e7be6b48d7d230
commit 3e43841b6239450185f1a83a30e7be6b48d7d230
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jan 13 09:44:52 2013 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jan 13 09:48:17 2013 +0100
Move the exported check for dependencies of targets
Check only once, in the Config.cmake file, instead of once in each
Config-<cfg>.cmake file.
diff --git a/Source/cmExportBuildFileGenerator.cxx b/Source/cmExportBuildFileGenerator.cxx
index 29f6743..ad61803 100644
--- a/Source/cmExportBuildFileGenerator.cxx
+++ b/Source/cmExportBuildFileGenerator.cxx
@@ -74,16 +74,16 @@ bool cmExportBuildFileGenerator::GenerateMainFile(std::ostream& os)
this->GenerateInterfaceProperties(te, os, properties);
}
- this->GenerateMissingTargetsCheckCode(os, missingTargets);
-
// Generate import file content for each configuration.
for(std::vector<std::string>::const_iterator
ci = this->Configurations.begin();
ci != this->Configurations.end(); ++ci)
{
- this->GenerateImportConfig(os, ci->c_str());
+ this->GenerateImportConfig(os, ci->c_str(), missingTargets);
}
+ this->GenerateMissingTargetsCheckCode(os, missingTargets);
+
return true;
}
@@ -91,7 +91,8 @@ bool cmExportBuildFileGenerator::GenerateMainFile(std::ostream& os)
void
cmExportBuildFileGenerator
::GenerateImportTargetsConfig(std::ostream& os,
- const char* config, std::string const& suffix)
+ const char* config, std::string const& suffix,
+ std::vector<std::string> &missingTargets)
{
for(std::vector<cmTarget*>::const_iterator
tei = this->Exports->begin();
@@ -104,7 +105,6 @@ cmExportBuildFileGenerator
if(!properties.empty())
{
// Get the rest of the target details.
- std::vector<std::string> missingTargets;
this->SetImportDetailProperties(config, suffix,
target, properties, missingTargets);
this->SetImportLinkInterface(config, suffix,
@@ -119,7 +119,6 @@ cmExportBuildFileGenerator
// properties);
// Generate code in the export file.
- this->GenerateMissingTargetsCheckCode(os, missingTargets);
this->GenerateImportPropertyCode(os, config, target, properties);
}
}
diff --git a/Source/cmExportBuildFileGenerator.h b/Source/cmExportBuildFileGenerator.h
index 726537b..5e1be16 100644
--- a/Source/cmExportBuildFileGenerator.h
+++ b/Source/cmExportBuildFileGenerator.h
@@ -44,7 +44,8 @@ protected:
virtual bool GenerateMainFile(std::ostream& os);
virtual void GenerateImportTargetsConfig(std::ostream& os,
const char* config,
- std::string const& suffix);
+ std::string const& suffix,
+ std::vector<std::string> &missingTargets);
virtual void HandleMissingTarget(std::string& link_libs,
std::vector<std::string>& missingTargets,
cmMakefile* mf,
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index a2d6961..fc78eeb 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -107,7 +107,8 @@ bool cmExportFileGenerator::GenerateImportFile()
//----------------------------------------------------------------------------
void cmExportFileGenerator::GenerateImportConfig(std::ostream& os,
- const char* config)
+ const char* config,
+ std::vector<std::string> &missingTargets)
{
// Construct the property configuration suffix.
std::string suffix = "_";
@@ -121,7 +122,7 @@ void cmExportFileGenerator::GenerateImportConfig(std::ostream& os,
}
// Generate the per-config target information.
- this->GenerateImportTargetsConfig(os, config, suffix);
+ this->GenerateImportTargetsConfig(os, config, suffix, missingTargets);
}
//----------------------------------------------------------------------------
diff --git a/Source/cmExportFileGenerator.h b/Source/cmExportFileGenerator.h
index 4d97a63..8620dd1 100644
--- a/Source/cmExportFileGenerator.h
+++ b/Source/cmExportFileGenerator.h
@@ -47,7 +47,8 @@ protected:
// Generate per-configuration target information to the given output
// stream.
- void GenerateImportConfig(std::ostream& os, const char* config);
+ void GenerateImportConfig(std::ostream& os, const char* config,
+ std::vector<std::string> &missingTargets);
// Methods to implement export file code generation.
void GenerateImportHeaderCode(std::ostream& os, const char* config = 0);
@@ -85,7 +86,8 @@ protected:
/** Each subclass knows where the target files are located. */
virtual void GenerateImportTargetsConfig(std::ostream& os,
const char* config,
- std::string const& suffix) = 0;
+ std::string const& suffix,
+ std::vector<std::string> &missingTargets) = 0;
/** Each subclass knows how to deal with a target that is missing from an
* export set. */
diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx
index 68881a1..bffa2b6 100644
--- a/Source/cmExportInstallFileGenerator.cxx
+++ b/Source/cmExportInstallFileGenerator.cxx
@@ -93,7 +93,6 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os)
this->GenerateInterfaceProperties(te, os, properties);
}
- this->GenerateMissingTargetsCheckCode(os, missingTargets);
// Now load per-configuration properties for them.
os << "# Load information for each installed configuration.\n"
@@ -111,17 +110,21 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os)
ci = this->Configurations.begin();
ci != this->Configurations.end(); ++ci)
{
- if(!this->GenerateImportFileConfig(ci->c_str()))
+ if(!this->GenerateImportFileConfig(ci->c_str(), missingTargets))
{
result = false;
}
}
+
+ this->GenerateMissingTargetsCheckCode(os, missingTargets);
+
return result;
}
//----------------------------------------------------------------------------
bool
-cmExportInstallFileGenerator::GenerateImportFileConfig(const char* config)
+cmExportInstallFileGenerator::GenerateImportFileConfig(const char* config,
+ std::vector<std::string> &missingTargets)
{
// Skip configurations not enabled for this export.
if(!this->IEGen->InstallsForConfig(config))
@@ -161,7 +164,7 @@ cmExportInstallFileGenerator::GenerateImportFileConfig(const char* config)
this->GenerateImportHeaderCode(os, config);
// Generate the per-config target information.
- this->GenerateImportConfig(os, config);
+ this->GenerateImportConfig(os, config, missingTargets);
// End with the import file footer.
this->GenerateImportFooterCode(os);
@@ -176,7 +179,8 @@ cmExportInstallFileGenerator::GenerateImportFileConfig(const char* config)
void
cmExportInstallFileGenerator
::GenerateImportTargetsConfig(std::ostream& os,
- const char* config, std::string const& suffix)
+ const char* config, std::string const& suffix,
+ std::vector<std::string> &missingTargets)
{
// Add code to compute the installation prefix relative to the
// import file location.
@@ -225,7 +229,6 @@ cmExportInstallFileGenerator
if(!properties.empty())
{
// Get the rest of the target details.
- std::vector<std::string> missingTargets;
this->SetImportDetailProperties(config, suffix,
te->Target, properties, missingTargets);
@@ -240,7 +243,6 @@ cmExportInstallFileGenerator
// properties);
// Generate code in the export file.
- this->GenerateMissingTargetsCheckCode(os, missingTargets);
this->GenerateImportPropertyCode(os, config, te->Target, properties);
this->GenerateImportedFileChecksCode(os, te->Target, properties,
importedLocations);
diff --git a/Source/cmExportInstallFileGenerator.h b/Source/cmExportInstallFileGenerator.h
index e719ecc..e187749 100644
--- a/Source/cmExportInstallFileGenerator.h
+++ b/Source/cmExportInstallFileGenerator.h
@@ -56,7 +56,8 @@ protected:
virtual bool GenerateMainFile(std::ostream& os);
virtual void GenerateImportTargetsConfig(std::ostream& os,
const char* config,
- std::string const& suffix);
+ std::string const& suffix,
+ std::vector<std::string> &missingTargets);
virtual void HandleMissingTarget(std::string& link_libs,
std::vector<std::string>& missingTargets,
cmMakefile* mf,
@@ -72,7 +73,8 @@ protected:
/** Generate a per-configuration file for the targets. */
- bool GenerateImportFileConfig(const char* config);
+ bool GenerateImportFileConfig(const char* config,
+ std::vector<std::string> &missingTargets);
/** Fill in properties indicating installed file locations. */
void SetImportLocationProperty(const char* config,
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bec264cc9d79d7f05dd0f332c48b8a890380d85d
commit bec264cc9d79d7f05dd0f332c48b8a890380d85d
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jan 13 09:42:47 2013 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jan 13 09:42:47 2013 +0100
Only generate one check per missing target.
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index 91de200..a2d6961 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -671,19 +671,23 @@ void cmExportFileGenerator::GenerateMissingTargetsCheckCode(std::ostream& os,
}
os << "# Make sure the targets which have been exported in some other \n"
"# export set exist.\n";
+ std::set<std::string> emitted;
for(unsigned int i=0; i<missingTargets.size(); ++i)
{
- os << "IF(NOT TARGET \"" << missingTargets[i] << "\" )\n"
- << " IF(CMAKE_FIND_PACKAGE_NAME)\n"
- << " SET( ${CMAKE_FIND_PACKAGE_NAME}_FOUND FALSE)\n"
- << " SET( ${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE "
- << "\"Required imported target \\\"" << missingTargets[i]
- << "\\\" not found ! \")\n"
- << " ELSE()\n"
- << " MESSAGE(FATAL_ERROR \"Required imported target \\\""
- << missingTargets[i] << "\\\" not found ! \")\n"
- << " ENDIF()\n"
- << "ENDIF()\n";
+ if (emitted.insert(missingTargets[i]).second)
+ {
+ os << "IF(NOT TARGET \"" << missingTargets[i] << "\" )\n"
+ << " IF(CMAKE_FIND_PACKAGE_NAME)\n"
+ << " SET( ${CMAKE_FIND_PACKAGE_NAME}_FOUND FALSE)\n"
+ << " SET( ${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE "
+ << "\"Required imported target \\\"" << missingTargets[i]
+ << "\\\" not found ! \")\n"
+ << " ELSE()\n"
+ << " MESSAGE(FATAL_ERROR \"Required imported target \\\""
+ << missingTargets[i] << "\\\" not found ! \")\n"
+ << " ENDIF()\n"
+ << "ENDIF()\n";
+ }
}
os << "\n";
}
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f3053ddfc45cb02a3f9d6d03a58fc085c0965cf7
commit f3053ddfc45cb02a3f9d6d03a58fc085c0965cf7
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jan 13 09:42:07 2013 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jan 13 09:42:07 2013 +0100
Don't write a comment in the export file without the code.
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index 94e24c7..91de200 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -665,6 +665,10 @@ cmExportFileGenerator
void cmExportFileGenerator::GenerateMissingTargetsCheckCode(std::ostream& os,
const std::vector<std::string>& missingTargets)
{
+ if (missingTargets.empty())
+ {
+ return;
+ }
os << "# Make sure the targets which have been exported in some other \n"
"# export set exist.\n";
for(unsigned int i=0; i<missingTargets.size(); ++i)
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6df033354365281098354f6cf98d070498d6ff8d
commit 6df033354365281098354f6cf98d070498d6ff8d
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jan 13 09:39:29 2013 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jan 13 09:41:50 2013 +0100
Strip consecutive semicolons when preprocessing genex strings.
diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx
index d306dee..c9a2e5e 100644
--- a/Source/cmGeneratorExpression.cxx
+++ b/Source/cmGeneratorExpression.cxx
@@ -148,6 +148,38 @@ cmCompiledGeneratorExpression::~cmCompiledGeneratorExpression()
}
//----------------------------------------------------------------------------
+static std::string stripEmptyListElements(const std::string &input)
+{
+ std::string result;
+
+ const char *c = input.c_str();
+ bool skipSemiColons = true;
+ for ( ; *c; ++c)
+ {
+ if(c[0] == ';')
+ {
+ if(skipSemiColons)
+ {
+ continue;
+ }
+ skipSemiColons = true;
+ }
+ else
+ {
+ skipSemiColons = false;
+ }
+ result += *c;
+ }
+
+ if (*(result.end() - 1) == ';')
+ {
+ result.resize(result.size() - 1);
+ }
+
+ return result;
+}
+
+//----------------------------------------------------------------------------
static std::string stripAllGeneratorExpressions(const std::string &input)
{
std::string result;
@@ -186,7 +218,7 @@ static std::string stripAllGeneratorExpressions(const std::string &input)
lastPos = pos;
}
result += input.substr(lastPos);
- return result;
+ return stripEmptyListElements(result);
}
//----------------------------------------------------------------------------
@@ -247,7 +279,7 @@ static std::string stripExportInterface(const std::string &input,
}
result += input.substr(lastPos);
- return result;
+ return stripEmptyListElements(result);
}
//----------------------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
Source/CMakeVersion.cmake | 2 +-
Source/cmExportBuildFileGenerator.cxx | 11 ++++-----
Source/cmExportBuildFileGenerator.h | 3 +-
Source/cmExportFileGenerator.cxx | 35 +++++++++++++++++++-----------
Source/cmExportFileGenerator.h | 6 +++-
Source/cmExportInstallFileGenerator.cxx | 20 +++++++++-------
Source/cmExportInstallFileGenerator.h | 6 +++-
Source/cmGeneratorExpression.cxx | 36 +++++++++++++++++++++++++++++-
8 files changed, 83 insertions(+), 36 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list