diff options
-rw-r--r-- | Modules/CMakeCInformation.cmake | 4 | ||||
-rw-r--r-- | Modules/CMakeCXXInformation.cmake | 4 | ||||
-rw-r--r-- | Modules/CMakeFortranInformation.cmake | 4 | ||||
-rw-r--r-- | Modules/Platform/UnixPaths.cmake | 2 | ||||
-rw-r--r-- | Source/CMakeVersion.cmake | 2 | ||||
-rw-r--r-- | Source/cmArchiveWrite.cxx | 35 |
6 files changed, 29 insertions, 22 deletions
diff --git a/Modules/CMakeCInformation.cmake b/Modules/CMakeCInformation.cmake index e0cce45..332b26e 100644 --- a/Modules/CMakeCInformation.cmake +++ b/Modules/CMakeCInformation.cmake @@ -175,10 +175,10 @@ endif() # Create a static archive incrementally for large object file counts. # If CMAKE_C_CREATE_STATIC_LIBRARY is set it will override these. if(NOT DEFINED CMAKE_C_ARCHIVE_CREATE) - set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS>") + set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> cq <TARGET> <LINK_FLAGS> <OBJECTS>") endif() if(NOT DEFINED CMAKE_C_ARCHIVE_APPEND) - set(CMAKE_C_ARCHIVE_APPEND "<CMAKE_AR> r <TARGET> <LINK_FLAGS> <OBJECTS>") + set(CMAKE_C_ARCHIVE_APPEND "<CMAKE_AR> q <TARGET> <LINK_FLAGS> <OBJECTS>") endif() if(NOT DEFINED CMAKE_C_ARCHIVE_FINISH) set(CMAKE_C_ARCHIVE_FINISH "<CMAKE_RANLIB> <TARGET>") diff --git a/Modules/CMakeCXXInformation.cmake b/Modules/CMakeCXXInformation.cmake index 3010a48..72b2857 100644 --- a/Modules/CMakeCXXInformation.cmake +++ b/Modules/CMakeCXXInformation.cmake @@ -266,10 +266,10 @@ endif() # Create a static archive incrementally for large object file counts. # If CMAKE_CXX_CREATE_STATIC_LIBRARY is set it will override these. if(NOT DEFINED CMAKE_CXX_ARCHIVE_CREATE) - set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS>") + set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> cq <TARGET> <LINK_FLAGS> <OBJECTS>") endif() if(NOT DEFINED CMAKE_CXX_ARCHIVE_APPEND) - set(CMAKE_CXX_ARCHIVE_APPEND "<CMAKE_AR> r <TARGET> <LINK_FLAGS> <OBJECTS>") + set(CMAKE_CXX_ARCHIVE_APPEND "<CMAKE_AR> q <TARGET> <LINK_FLAGS> <OBJECTS>") endif() if(NOT DEFINED CMAKE_CXX_ARCHIVE_FINISH) set(CMAKE_CXX_ARCHIVE_FINISH "<CMAKE_RANLIB> <TARGET>") diff --git a/Modules/CMakeFortranInformation.cmake b/Modules/CMakeFortranInformation.cmake index 080dc68..d638207 100644 --- a/Modules/CMakeFortranInformation.cmake +++ b/Modules/CMakeFortranInformation.cmake @@ -194,10 +194,10 @@ endif() # Create a static archive incrementally for large object file counts. # If CMAKE_Fortran_CREATE_STATIC_LIBRARY is set it will override these. if(NOT DEFINED CMAKE_Fortran_ARCHIVE_CREATE) - set(CMAKE_Fortran_ARCHIVE_CREATE "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS>") + set(CMAKE_Fortran_ARCHIVE_CREATE "<CMAKE_AR> cq <TARGET> <LINK_FLAGS> <OBJECTS>") endif() if(NOT DEFINED CMAKE_Fortran_ARCHIVE_APPEND) - set(CMAKE_Fortran_ARCHIVE_APPEND "<CMAKE_AR> r <TARGET> <LINK_FLAGS> <OBJECTS>") + set(CMAKE_Fortran_ARCHIVE_APPEND "<CMAKE_AR> q <TARGET> <LINK_FLAGS> <OBJECTS>") endif() if(NOT DEFINED CMAKE_Fortran_ARCHIVE_FINISH) set(CMAKE_Fortran_ARCHIVE_FINISH "<CMAKE_RANLIB> <TARGET>") diff --git a/Modules/Platform/UnixPaths.cmake b/Modules/Platform/UnixPaths.cmake index eca3280..20ee1d1 100644 --- a/Modules/Platform/UnixPaths.cmake +++ b/Modules/Platform/UnixPaths.cmake @@ -83,7 +83,7 @@ list(APPEND CMAKE_SYSTEM_PROGRAM_PATH ) list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES - /lib /usr/lib /usr/lib32 /usr/lib64 + /lib /lib32 /lib64 /usr/lib /usr/lib32 /usr/lib64 ) list(APPEND CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index a6be93f..6ac332b 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 0) -set(CMake_VERSION_PATCH 20140415) +set(CMake_VERSION_PATCH 20140417) #set(CMake_VERSION_RC 1) diff --git a/Source/cmArchiveWrite.cxx b/Source/cmArchiveWrite.cxx index d5dcd6a..58f7573 100644 --- a/Source/cmArchiveWrite.cxx +++ b/Source/cmArchiveWrite.cxx @@ -18,6 +18,13 @@ #include <cm_libarchive.h> //---------------------------------------------------------------------------- +static std::string cm_archive_error_string(struct archive* a) +{ + const char* e = archive_error_string(a); + return e? e : "unknown error"; +} + +//---------------------------------------------------------------------------- class cmArchiveWrite::Entry { struct archive_entry* Object; @@ -60,7 +67,7 @@ cmArchiveWrite::cmArchiveWrite(std::ostream& os, Compress c, Type t): if(archive_write_set_compression_none(this->Archive) != ARCHIVE_OK) { this->Error = "archive_write_set_compression_none: "; - this->Error += archive_error_string(this->Archive); + this->Error += cm_archive_error_string(this->Archive); return; } break; @@ -68,7 +75,7 @@ cmArchiveWrite::cmArchiveWrite(std::ostream& os, Compress c, Type t): if(archive_write_set_compression_compress(this->Archive) != ARCHIVE_OK) { this->Error = "archive_write_set_compression_compress: "; - this->Error += archive_error_string(this->Archive); + this->Error += cm_archive_error_string(this->Archive); return; } break; @@ -76,7 +83,7 @@ cmArchiveWrite::cmArchiveWrite(std::ostream& os, Compress c, Type t): if(archive_write_set_compression_gzip(this->Archive) != ARCHIVE_OK) { this->Error = "archive_write_set_compression_gzip: "; - this->Error += archive_error_string(this->Archive); + this->Error += cm_archive_error_string(this->Archive); return; } break; @@ -84,7 +91,7 @@ cmArchiveWrite::cmArchiveWrite(std::ostream& os, Compress c, Type t): if(archive_write_set_compression_bzip2(this->Archive) != ARCHIVE_OK) { this->Error = "archive_write_set_compression_bzip2: "; - this->Error += archive_error_string(this->Archive); + this->Error += cm_archive_error_string(this->Archive); return; } break; @@ -92,7 +99,7 @@ cmArchiveWrite::cmArchiveWrite(std::ostream& os, Compress c, Type t): if(archive_write_set_compression_lzma(this->Archive) != ARCHIVE_OK) { this->Error = "archive_write_set_compression_lzma: "; - this->Error += archive_error_string(this->Archive); + this->Error += cm_archive_error_string(this->Archive); return; } break; @@ -100,7 +107,7 @@ cmArchiveWrite::cmArchiveWrite(std::ostream& os, Compress c, Type t): if(archive_write_set_compression_xz(this->Archive) != ARCHIVE_OK) { this->Error = "archive_write_set_compression_xz: "; - this->Error += archive_error_string(this->Archive); + this->Error += cm_archive_error_string(this->Archive); return; } break; @@ -109,7 +116,7 @@ cmArchiveWrite::cmArchiveWrite(std::ostream& os, Compress c, Type t): if (archive_read_disk_set_standard_lookup(this->Disk) != ARCHIVE_OK) { this->Error = "archive_read_disk_set_standard_lookup: "; - this->Error += archive_error_string(this->Archive); + this->Error += cm_archive_error_string(this->Archive); return;; } #endif @@ -119,7 +126,7 @@ cmArchiveWrite::cmArchiveWrite(std::ostream& os, Compress c, Type t): if(archive_write_set_format_zip(this->Archive) != ARCHIVE_OK) { this->Error = "archive_write_set_format_zip: "; - this->Error += archive_error_string(this->Archive); + this->Error += cm_archive_error_string(this->Archive); return; } break; @@ -127,7 +134,7 @@ cmArchiveWrite::cmArchiveWrite(std::ostream& os, Compress c, Type t): if(archive_write_set_format_pax_restricted(this->Archive) != ARCHIVE_OK) { this->Error = "archive_write_set_format_pax_restricted: "; - this->Error += archive_error_string(this->Archive); + this->Error += cm_archive_error_string(this->Archive); return; } break; @@ -137,7 +144,7 @@ cmArchiveWrite::cmArchiveWrite(std::ostream& os, Compress c, Type t): if (archive_write_set_bytes_in_last_block(this->Archive, 1)) { this->Error = "archive_write_set_bytes_in_last_block: "; - this->Error += archive_error_string(this->Archive); + this->Error += cm_archive_error_string(this->Archive); return; } @@ -147,7 +154,7 @@ cmArchiveWrite::cmArchiveWrite(std::ostream& os, Compress c, Type t): 0) != ARCHIVE_OK) { this->Error = "archive_write_open: "; - this->Error += archive_error_string(this->Archive); + this->Error += cm_archive_error_string(this->Archive); return; } } @@ -235,7 +242,7 @@ bool cmArchiveWrite::AddFile(const char* file, if(archive_read_disk_entry_from_file(this->Disk, e, -1, 0) != ARCHIVE_OK) { this->Error = "archive_read_disk_entry_from_file: "; - this->Error += archive_error_string(this->Disk); + this->Error += cm_archive_error_string(this->Disk); return false; } // Clear acl and xattr fields not useful for distribution. @@ -245,7 +252,7 @@ bool cmArchiveWrite::AddFile(const char* file, if(archive_write_header(this->Archive, e) != ARCHIVE_OK) { this->Error = "archive_write_header: "; - this->Error += archive_error_string(this->Archive); + this->Error += cm_archive_error_string(this->Archive); return false; } @@ -292,7 +299,7 @@ bool cmArchiveWrite::AddData(const char* file, size_t size) if(archive_write_data(this->Archive, buffer, nnext) != nnext_s) { this->Error = "archive_write_data: "; - this->Error += archive_error_string(this->Archive); + this->Error += cm_archive_error_string(this->Archive); return false; } nleft -= nnext; |