[Cmake-commits] CMake branch, next, updated. v3.2.1-1309-gf3c457f
Brad King
brad.king at kitware.com
Tue Mar 31 10:36:58 EDT 2015
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 f3c457f81e18c4f3b9fa7ca66c1f255a508e381d (commit)
via 93a3ec8b7705c6edfa08a59a789d193fcb4cf4c1 (commit)
from 2e0dac4c00494b3de4f8032f3f45724e1d232e3f (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=f3c457f81e18c4f3b9fa7ca66c1f255a508e381d
commit f3c457f81e18c4f3b9fa7ca66c1f255a508e381d
Merge: 2e0dac4 93a3ec8
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Mar 31 10:36:58 2015 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Mar 31 10:36:58 2015 -0400
Merge topic 'cpack-fix-preinstall-tool' into next
93a3ec8b CPack: Fix make tool selection during preinstall (#15483)
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=93a3ec8b7705c6edfa08a59a789d193fcb4cf4c1
commit 93a3ec8b7705c6edfa08a59a789d193fcb4cf4c1
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Mar 31 10:26:29 2015 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue Mar 31 10:30:25 2015 -0400
CPack: Fix make tool selection during preinstall (#15483)
The CMAKE_MAKE_PROGRAM selected by CMake while configuring the project
should also be used to drive the "preinstall" target during packaging.
Teach CPack to use "cmake --build" instead of constructing the build
command line itself. The "cmake --build" command already knows how
to select the proper make tool.
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx
index ee255af..67005ef 100644
--- a/Source/CPack/cmCPackGenerator.cxx
+++ b/Source/CPack/cmCPackGenerator.cxx
@@ -655,26 +655,19 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
cmSystemTools::SetForceUnixPaths(globalGenerator->GetForceUnixPaths());
// Does this generator require pre-install?
- if ( globalGenerator->GetPreinstallTargetName() )
+ if (const char* preinstall = globalGenerator->GetPreinstallTargetName())
{
- globalGenerator->FindMakeProgram(this->MakefileMap);
- std::string cmakeMakeProgram
- = this->MakefileMap->GetSafeDefinition("CMAKE_MAKE_PROGRAM");
- std::vector<std::string> buildCommand;
- globalGenerator->GenerateBuildCommand(buildCommand, cmakeMakeProgram,
- installProjectName, installDirectory,
- globalGenerator->GetPreinstallTargetName(),
- buildConfig, false, false);
- std::string buildCommandStr =
- cmSystemTools::PrintSingleCommand(buildCommand);
+ std::string buildCommand =
+ globalGenerator->GenerateCMakeBuildCommand(
+ preinstall, buildConfig, "", false);
cmCPackLogger(cmCPackLog::LOG_DEBUG,
- "- Install command: " << buildCommandStr << std::endl);
+ "- Install command: " << buildCommand << std::endl);
cmCPackLogger(cmCPackLog::LOG_OUTPUT,
"- Run preinstall target for: " << installProjectName << std::endl);
std::string output;
int retVal = 1;
bool resB =
- cmSystemTools::RunSingleCommand(buildCommand,
+ cmSystemTools::RunSingleCommand(buildCommand.c_str(),
&output,
&retVal,
installDirectory.c_str(),
@@ -684,12 +677,12 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
std::string tmpFile = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
tmpFile += "/PreinstallOutput.log";
cmGeneratedFileStream ofs(tmpFile.c_str());
- ofs << "# Run command: " << buildCommandStr << std::endl
+ ofs << "# Run command: " << buildCommand << std::endl
<< "# Directory: " << installDirectory << std::endl
<< "# Output:" << std::endl
<< output << std::endl;
cmCPackLogger(cmCPackLog::LOG_ERROR,
- "Problem running install command: " << buildCommandStr
+ "Problem running install command: " << buildCommand
<< std::endl
<< "Please check " << tmpFile << " for errors"
<< std::endl);
-----------------------------------------------------------------------
Summary of changes:
Source/CPack/cmCPackGenerator.cxx | 23 ++++++++---------------
1 file changed, 8 insertions(+), 15 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list