summaryrefslogtreecommitdiffstats
path: root/Source/CPack
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-05-20 13:10:52 (GMT)
committerBrad King <brad.king@kitware.com>2015-05-20 15:20:42 (GMT)
commit6fbd4cae0d7765d305d753a78d167b3fcaa6eaf6 (patch)
tree051865c2b01f491e3472f577f39a13080d55be43 /Source/CPack
parent594dd9b36a7f3ac37b56c89596ff38451570de3e (diff)
downloadCMake-6fbd4cae0d7765d305d753a78d167b3fcaa6eaf6.zip
CMake-6fbd4cae0d7765d305d753a78d167b3fcaa6eaf6.tar.gz
CMake-6fbd4cae0d7765d305d753a78d167b3fcaa6eaf6.tar.bz2
Use cmSystemTools::GetCMakeCommand() to get path to cmake internally
This is much simpler than finding a way to lookup "CMAKE_COMMAND" everywhere.
Diffstat (limited to 'Source/CPack')
-rw-r--r--Source/CPack/cmCPackDebGenerator.cxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx
index 0137374..5049a3f 100644
--- a/Source/CPack/cmCPackDebGenerator.cxx
+++ b/Source/CPack/cmCPackDebGenerator.cxx
@@ -283,8 +283,6 @@ int cmCPackDebGenerator::PackageFiles()
int cmCPackDebGenerator::createDeb()
{
- const char* cmakeExecutable = this->GetOption("CMAKE_COMMAND");
-
// debian-binary file
std::string dbfilename;
dbfilename += this->GetOption("GEN_WDIR");
@@ -420,15 +418,15 @@ int cmCPackDebGenerator::createDeb()
} else if(!strcmp(debian_compression_type, "bzip2")) {
compression_suffix = ".bz2";
compression_modifier = "j";
- cmake_tar += "\"" + std::string(cmakeExecutable) + "\" -E ";
+ cmake_tar += "\"" + cmSystemTools::GetCMakeCommand() + "\" -E ";
} else if(!strcmp(debian_compression_type, "gzip")) {
compression_suffix = ".gz";
compression_modifier = "z";
- cmake_tar += "\"" + std::string(cmakeExecutable) + "\" -E ";
+ cmake_tar += "\"" + cmSystemTools::GetCMakeCommand() + "\" -E ";
} else if(!strcmp(debian_compression_type, "none")) {
compression_suffix = "";
compression_modifier = "";
- cmake_tar += "\"" + std::string(cmakeExecutable) + "\" -E ";
+ cmake_tar += "\"" + cmSystemTools::GetCMakeCommand() + "\" -E ";
} else {
cmCPackLogger(cmCPackLog::LOG_ERROR,
"Error unrecognized compression type: "
@@ -501,7 +499,7 @@ int cmCPackDebGenerator::createDeb()
fileIt != packageFiles.end(); ++ fileIt )
{
cmd = "\"";
- cmd += cmakeExecutable;
+ cmd += cmSystemTools::GetCMakeCommand();
cmd += "\" -E md5sum \"";
cmd += *fileIt;
cmd += "\"";