diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2014-02-07 19:43:19 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-03-08 18:05:37 (GMT) |
commit | 2b17626e9b0ffbd5b3adf81e64aae975a35c8b6b (patch) | |
tree | a280562a42e86879962eae8da7d9b752bb39de79 /Source/CPack | |
parent | 3def29da3c16ad3a72f05ea8b97ee728e6e3581e (diff) | |
download | CMake-2b17626e9b0ffbd5b3adf81e64aae975a35c8b6b.zip CMake-2b17626e9b0ffbd5b3adf81e64aae975a35c8b6b.tar.gz CMake-2b17626e9b0ffbd5b3adf81e64aae975a35c8b6b.tar.bz2 |
stringapi: Pass strings as install directories in CPack
Diffstat (limited to 'Source/CPack')
-rw-r--r-- | Source/CPack/cmCPackGenerator.cxx | 18 | ||||
-rw-r--r-- | Source/CPack/cmCPackGenerator.h | 8 |
2 files changed, 13 insertions, 13 deletions
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx index 4c52c96..3e1bf3b 100644 --- a/Source/CPack/cmCPackGenerator.cxx +++ b/Source/CPack/cmCPackGenerator.cxx @@ -254,7 +254,7 @@ int cmCPackGenerator::InstallProject() // If the project is a CMAKE project then run pre-install // and then read the cmake_install script to run it if ( !this->InstallProjectViaInstallCMakeProjects( - setDestDir, bareTempInstallDirectory.c_str()) ) + setDestDir, bareTempInstallDirectory) ) { return 0; } @@ -269,7 +269,7 @@ int cmCPackGenerator::InstallProject() //---------------------------------------------------------------------- int cmCPackGenerator::InstallProjectViaInstallCommands( - bool setDestDir, const char* tempInstallDirectory) + bool setDestDir, const std::string& tempInstallDirectory) { (void) setDestDir; const char* installCommands = this->GetOption("CPACK_INSTALL_COMMANDS"); @@ -312,7 +312,7 @@ int cmCPackGenerator::InstallProjectViaInstallCommands( //---------------------------------------------------------------------- int cmCPackGenerator::InstallProjectViaInstalledDirectories( - bool setDestDir, const char* tempInstallDirectory) + bool setDestDir, const std::string& tempInstallDirectory) { (void)setDestDir; (void)tempInstallDirectory; @@ -349,7 +349,7 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories( return 0; } std::vector<std::string>::iterator it; - const char* tempDir = tempInstallDirectory; + const std::string& tempDir = tempInstallDirectory; for ( it = installDirectoriesVector.begin(); it != installDirectoriesVector.end(); ++it ) @@ -457,7 +457,7 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories( //---------------------------------------------------------------------- int cmCPackGenerator::InstallProjectViaInstallScript( - bool setDestDir, const char* tempInstallDirectory) + bool setDestDir, const std::string& tempInstallDirectory) { const char* cmakeScripts = this->GetOption("CPACK_INSTALL_SCRIPT"); @@ -499,7 +499,7 @@ int cmCPackGenerator::InstallProjectViaInstallScript( } else { - this->SetOption("CMAKE_INSTALL_PREFIX", tempInstallDirectory); + this->SetOption("CMAKE_INSTALL_PREFIX", tempInstallDirectory.c_str()); cmCPackLogger(cmCPackLog::LOG_DEBUG, "- Using non-DESTDIR install... (this->SetOption)" << std::endl); @@ -509,9 +509,9 @@ int cmCPackGenerator::InstallProjectViaInstallScript( } this->SetOptionIfNotSet("CMAKE_CURRENT_BINARY_DIR", - tempInstallDirectory); + tempInstallDirectory.c_str()); this->SetOptionIfNotSet("CMAKE_CURRENT_SOURCE_DIR", - tempInstallDirectory); + tempInstallDirectory.c_str()); int res = this->MakefileMap->ReadListFile(0, installScript.c_str()); if ( cmSystemTools::GetErrorOccuredFlag() || !res ) { @@ -524,7 +524,7 @@ int cmCPackGenerator::InstallProjectViaInstallScript( //---------------------------------------------------------------------- int cmCPackGenerator::InstallProjectViaInstallCMakeProjects( - bool setDestDir, const char* baseTempInstallDirectory) + bool setDestDir, const std::string& baseTempInstallDirectory) { const char* cmakeProjects = this->GetOption("CPACK_INSTALL_CMAKE_PROJECTS"); diff --git a/Source/CPack/cmCPackGenerator.h b/Source/CPack/cmCPackGenerator.h index 7e7c94f..fadd1bf 100644 --- a/Source/CPack/cmCPackGenerator.h +++ b/Source/CPack/cmCPackGenerator.h @@ -190,13 +190,13 @@ protected: //! Run install commands if specified virtual int InstallProjectViaInstallCommands( - bool setDestDir, const char* tempInstallDirectory); + bool setDestDir, const std::string& tempInstallDirectory); virtual int InstallProjectViaInstallScript( - bool setDestDir, const char* tempInstallDirectory); + bool setDestDir, const std::string& tempInstallDirectory); virtual int InstallProjectViaInstalledDirectories( - bool setDestDir, const char* tempInstallDirectory); + bool setDestDir, const std::string& tempInstallDirectory); virtual int InstallProjectViaInstallCMakeProjects( - bool setDestDir, const char* tempInstallDirectory); + bool setDestDir, const std::string& tempInstallDirectory); /** * The various level of support of |