[Cmake-commits] CMake branch, next, updated. v2.8.10.2-2418-g56db42b
Brad King
brad.king at kitware.com
Fri Mar 8 08:21:57 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 56db42bc5ffd642d83dd8dbba4bfc87e2899fe0f (commit)
via 794789047d1cc45303881870bf1a68b8dd96cf2f (commit)
via aa027af9af0193f5c47a7f2adf239858afdf3807 (commit)
via 06a45e816958065849c30dd3029db538aa7b399e (commit)
from a2e89c53e8b5c8a721ff55e2611c0e3ab45ba568 (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=56db42bc5ffd642d83dd8dbba4bfc87e2899fe0f
commit 56db42bc5ffd642d83dd8dbba4bfc87e2899fe0f
Merge: a2e89c5 7947890
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Mar 8 08:21:54 2013 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Mar 8 08:21:54 2013 -0500
Merge topic 'cpack-nsis-no-release-version' into next
7947890 CPack: Fix NSIS version check without release version (#9721)
aa027af CMake Nightly Date Stamp
06a45e8 CMake Nightly Date Stamp
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=794789047d1cc45303881870bf1a68b8dd96cf2f
commit 794789047d1cc45303881870bf1a68b8dd96cf2f
Author: Gerald Hofmann <gh at cosin.eu>
AuthorDate: Fri Mar 8 08:13:33 2013 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Fri Mar 8 08:17:05 2013 -0500
CPack: Fix NSIS version check without release version (#9721)
Only check a release version for the minimum required version. If NSIS
returns a CVS build version string (as when built by Macports), skip the
version check altogether and assume a sufficiently new version. Also
correctly handle the case where the version check fails and the
CPACK_TOPLEVEL_DIRECTORY option is not set.
Co-Author: Graham Menhennitt <graham at menhennitt.com.au>
diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx
index 9f86ea2..62bfa91 100644
--- a/Source/CPack/cmCPackNSISGenerator.cxx
+++ b/Source/CPack/cmCPackNSISGenerator.cxx
@@ -432,11 +432,14 @@ int cmCPackNSISGenerator::InitializeInternal()
int retVal = 1;
bool resS = cmSystemTools::RunSingleCommand(nsisCmd.c_str(),
&output, &retVal, 0, this->GeneratorVerbose, 0);
-
cmsys::RegularExpression versionRex("v([0-9]+.[0-9]+)");
- if ( !resS || retVal || !versionRex.find(output))
+ cmsys::RegularExpression versionRexCVS("v(.*)\\.cvs");
+ if ( !resS || retVal ||
+ (!versionRex.find(output) && !versionRexCVS.find(output))
+ )
{
- std::string tmpFile = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
+ const char* topDir = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
+ std::string tmpFile = topDir ? topDir : ".";
tmpFile += "/NSISOutput.log";
cmGeneratedFileStream ofs(tmpFile.c_str());
ofs << "# Run command: " << nsisCmd.c_str() << std::endl
@@ -448,17 +451,26 @@ int cmCPackNSISGenerator::InitializeInternal()
<< "Please check " << tmpFile.c_str() << " for errors" << std::endl);
return 0;
}
- double nsisVersion = atof(versionRex.match(1).c_str());
- double minNSISVersion = 2.09;
- cmCPackLogger(cmCPackLog::LOG_DEBUG, "NSIS Version: "
- << nsisVersion << std::endl);
- if ( nsisVersion < minNSISVersion )
+ if ( versionRex.find(output))
{
- cmCPackLogger(cmCPackLog::LOG_ERROR,
- "CPack requires NSIS Version 2.09 or greater. NSIS found on the system "
- "was: "
+ double nsisVersion = atof(versionRex.match(1).c_str());
+ double minNSISVersion = 2.09;
+ cmCPackLogger(cmCPackLog::LOG_DEBUG, "NSIS Version: "
<< nsisVersion << std::endl);
- return 0;
+ if ( nsisVersion < minNSISVersion )
+ {
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "CPack requires NSIS Version 2.09 or greater. "
+ "NSIS found on the system was: "
+ << nsisVersion << std::endl);
+ return 0;
+ }
+ }
+ if ( versionRexCVS.find(output))
+ {
+ // No version check for NSIS cvs build
+ cmCPackLogger(cmCPackLog::LOG_DEBUG, "NSIS Version: CVS "
+ << versionRexCVS.match(1).c_str() << std::endl);
}
this->SetOptionIfNotSet("CPACK_INSTALLER_PROGRAM", nsisPath.c_str());
this->SetOptionIfNotSet("CPACK_NSIS_EXECUTABLES_DIRECTORY", "bin");
-----------------------------------------------------------------------
Summary of changes:
Source/CMakeVersion.cmake | 2 +-
Source/CPack/cmCPackNSISGenerator.cxx | 36 ++++++++++++++++++++++-----------
2 files changed, 25 insertions(+), 13 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list