diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2006-01-09 23:24:39 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2006-01-09 23:24:39 (GMT) |
commit | 25f6a108ea2ad65580a7bf7514d0e05c1c06c62c (patch) | |
tree | f420db05ddefea1b58a3f66e711aaa2d8dc6a5bf /Source/CPack | |
parent | f219d3c2637b311d1080a43595e03dc747cb143f (diff) | |
download | CMake-25f6a108ea2ad65580a7bf7514d0e05c1c06c62c.zip CMake-25f6a108ea2ad65580a7bf7514d0e05c1c06c62c.tar.gz CMake-25f6a108ea2ad65580a7bf7514d0e05c1c06c62c.tar.bz2 |
ENH: Use specified output file name, also detect errors during install
Diffstat (limited to 'Source/CPack')
-rw-r--r-- | Source/CPack/cmCPackGenericGenerator.cxx | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Source/CPack/cmCPackGenericGenerator.cxx b/Source/CPack/cmCPackGenericGenerator.cxx index 6da855e..80692b8 100644 --- a/Source/CPack/cmCPackGenericGenerator.cxx +++ b/Source/CPack/cmCPackGenericGenerator.cxx @@ -50,6 +50,7 @@ int cmCPackGenericGenerator::PrepareNames() tempDirectory += this->GetOption("CPACK_GENERATOR"); std::string topDirectory = tempDirectory; +/* std::string outName = this->GetOption("CPACK_PACKAGE_NAME"); outName += "-"; outName += this->GetOption("CPACK_PACKAGE_VERSION"); @@ -66,11 +67,12 @@ int cmCPackGenericGenerator::PrepareNames() outName += postfix; } tempDirectory += "/" + outName; +*/ + std::string outName = this->GetOption("CPACK_PACKAGE_FILE_NAME"); outName += "."; outName += this->GetOutputExtension(); - std::string installFile = this->GetOption("CPACK_PACKAGE_DIRECTORY"); installFile += "/cmake_install.cmake"; @@ -84,7 +86,7 @@ int cmCPackGenericGenerator::PrepareNames() this->SetOption("CPACK_TEMPORARY_DIRECTORY", tempDirectory.c_str()); this->SetOption("CPACK_INSTALL_FILE_NAME", installFile.c_str()); this->SetOption("CPACK_OUTPUT_FILE_NAME", outName.c_str()); - this->SetOption("CPACK_PACKAGE_FILE_NAME", destFile.c_str()); + this->SetOption("CPACK_OUTPUT_FILE_PATH", destFile.c_str()); this->SetOption("CPACK_TEMPORARY_PACKAGE_FILE_NAME", outFile.c_str()); this->SetOption("CPACK_INSTALL_DIRECTORY", this->GetInstallPath()); this->SetOption("CPACK_NATIVE_INSTALL_DIRECTORY", @@ -168,6 +170,10 @@ int cmCPackGenericGenerator::InstallProject() cmSystemTools::PutEnv(destDir.c_str()); } int res = mf->ReadListFile(0, installFile); + if ( cmSystemTools::GetErrorOccuredFlag() ) + { + res = 0; + } if ( !movable ) { cmSystemTools::PutEnv("DESTDIR="); @@ -205,7 +211,7 @@ int cmCPackGenericGenerator::ProcessGenerator() const char* tempPackageFileName = this->GetOption( "CPACK_TEMPORARY_PACKAGE_FILE_NAME"); - const char* packageFileName = this->GetOption("CPACK_PACKAGE_FILE_NAME"); + const char* packageFileName = this->GetOption("CPACK_OUTPUT_FILE_PATH"); const char* tempDirectory = this->GetOption("CPACK_TEMPORARY_DIRECTORY"); |