SHA256
3
0
forked from pool/cmake

Accepting request 407576 from home:mathletic:branches:devel:tools:building

update to CMake 3.6.0

OBS-URL: https://build.opensuse.org/request/show/407576
OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/cmake?expand=0&rev=254
This commit is contained in:
Martin Pluskal 2016-07-10 09:05:52 +00:00 committed by Git OBS Bridge
parent ad02e4d23b
commit ebbf5c10a8
12 changed files with 127 additions and 146 deletions

View File

@ -1,14 +0,0 @@
630a9a930518c840c931f6d54b6bdd87693072c1291f1c63e6b9474c351e0b80 cmake-3.5.2-Darwin-x86_64.dmg
ce96b92eef838c7a568e89c841b95e07dd0ac39fe7a93f25b759bbfd9968eb62 cmake-3.5.2-Darwin-x86_64.tar.Z
0263be8f59ba1ae88172d5db769c2af69bcd8b2cbd4a9b1a981c406ce609a4ca cmake-3.5.2-Darwin-x86_64.tar.gz
c0e8aef366791fe40ca0698a3a6a03b72bfcc541b2ba0e4a60fcfa0694ffa240 cmake-3.5.2-Linux-i386.sh
9b921b65d5e91ac315a00f15eed7e460716e9916247bd995a3e73a37db3b11eb cmake-3.5.2-Linux-i386.tar.Z
053d158dfc1393ec2c4b7f142868b6c92b3e10297068c9ff73bc9e654821c304 cmake-3.5.2-Linux-i386.tar.gz
2999af0a9e0f8173fe84a494e8a7e183e81c3e57e95c0d867aa1c76af0269760 cmake-3.5.2-Linux-x86_64.sh
6eb6468b7c28c99f98dc9ff82b2a07b740f2f548f4c183eded1783240c564f1a cmake-3.5.2-Linux-x86_64.tar.Z
5f7aeaebe33521647625e0411467de71a2886743e4aa2c179e04c9e141c6c8cd cmake-3.5.2-Linux-x86_64.tar.gz
32a7d80fd69f37de7cbc03ce633d3d33cee16dd241145c0147ffc771306ac81e cmake-3.5.2-win32-x86.msi
671073aee66b3480a564d0736792e40570a11e861bb34819bb7ae7858bbdfb80 cmake-3.5.2-win32-x86.zip
93d5cd50283fb661f21dfa586e91363952b023816aab647926a7172ac80ea6cd cmake-3.5.2.tar.Z
92d8410d3d981bb881dfff2aed466da55a58d34c7390d50449aa59b32bb5e62a cmake-3.5.2.tar.gz
43273227405d2f6f609d86e1c7cef4bd7d731193001316999640fabe93b2f557 cmake-3.5.2.zip

View File

@ -1,17 +0,0 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAABCAAGBQJXEQuuAAoJEC0s7xA0khaECaoQAJiW6ErSkPpVSDvUEg+kha5n
S1HziA6SBk7m5ciJdNdcTl9c0mXNwoyeguoU0aSa/NtQTtrOS7WVTXeHy9eEOIOP
dYMPjcxMp5pwLx0Q9ml3Mgqeo23kU33oL3/qlqHCt8H9HWzn6hxUta7oRC/cXCSD
djUZWdxpN2rDSnTzCpVqlGvhnlxEml2/7HOL1O5/N3Od7qIZ5RDCwV4bCjaJ4aeu
iVwOvKmDORvLVGvkD9aunxkDEoGKPwzKCiyZ+Zv2A+tGVH3+boaI+uHpjj6+bgAa
0oOHUZanXBte4aNK7HEVbciUfRxW8vqTU8vqxD4fMgf1iRsXr1ATSQ5v36JZg8hp
QcTGOtcRINugdCOfbIsgY87H6lDsuVKx8CiM8GPBAD7eygLtGEye/7r5Y9v3smKU
R9Ch/fXXBTLc3AR+99wKaBLGqpNFVOeXtx9oQtEcpURUTlc7PnyjPXZa44ODKjxj
mMy54iBxiyBsAkT61lzhomtDms462DysTWngarB6sOKfBDU3n+EiFDaNM4pvA2ii
uFrWOpIu7voTUpVe+L61/4bxMielhcKaNs+l36j/P49z3gCUm+DaKVUH1GZLnjhf
AFpYRy3W3jZv+hvl/cihI/bKunxm4d6G5ehZ1bFvt4H2jhlPo0lqEu+36VjGxzzJ
0T3i9cntaBPj7k6Mzo7u
=CAso
-----END PGP SIGNATURE-----

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:92d8410d3d981bb881dfff2aed466da55a58d34c7390d50449aa59b32bb5e62a
size 6863498

16
cmake-3.6.0-SHA-256.txt Normal file
View File

@ -0,0 +1,16 @@
3f7a5b46009de2ed1a5444ec1b54745a4dfd0d267ba9c027d054dce278ed2abd cmake-3.6.0-Darwin-x86_64.dmg
4b1acbf9cb5b83c0eee39ee15055d5fba60207f06533d2a436f6923b54702c90 cmake-3.6.0-Darwin-x86_64.tar.Z
195db78ed916e04237de4e2ba063cda384214f1f4a0bd1a37c0fafa3da44eca2 cmake-3.6.0-Darwin-x86_64.tar.gz
10d4758cd1b2ac807d1108e65396a25b5b114b82d9aa02a46557ff4aad229f3c cmake-3.6.0-Linux-i386.sh
726b27df079445555f5d750c20db18207a7f2f77f8a38d4f2b886405dc284b25 cmake-3.6.0-Linux-i386.tar.Z
20fcddb0c888615b3a6663cd1ce5a04aebdecba1ab13a13cfeec70661f7143c3 cmake-3.6.0-Linux-i386.tar.gz
29c5085fba1128587c0a0b6e9a90d882401e74780de2660544b0e1c1fe22fe31 cmake-3.6.0-Linux-x86_64.sh
bf57e4dd7e0d46b39a57db96689a9a463cb154a9e290114606cd8a7e299360ea cmake-3.6.0-Linux-x86_64.tar.Z
46cd2b5f72895fd6aeef94c7c159dbec9e7db89ad7d873b4b7843be86cf55505 cmake-3.6.0-Linux-x86_64.tar.gz
e147960cb02aaef00876ff613e7004bcabb3878812d8c44dbeb70d6e0320f214 cmake-3.6.0-win32-x86.msi
2ef3b4103ebc3a5d3e489f7ac77795387b5e6e080fee90549cdec31d9ef429f7 cmake-3.6.0-win32-x86.zip
ab491f3d925a2251be04752d16a81bcaf90b88abb48ac8b5760fb090d540b11f cmake-3.6.0-win64-x64.msi
24c6fe91991ece9deae9a926bc925ec0b9d5702ffe174ed85062dc5a6fccf0f4 cmake-3.6.0-win64-x64.zip
09bdf31cd38c57f7815221d28da99267fd2c19c71920901217c715bbd38f62c7 cmake-3.6.0.tar.Z
fd05ed40cc40ef9ef99fac7b0ece2e0b871858a82feade48546f5d2940147670 cmake-3.6.0.tar.gz
9e170d01370018adf7eec4eade875d6a9b19289ab0721716ce639bdecc486b8c cmake-3.6.0.zip

View File

@ -0,0 +1,17 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAABCAAGBQJXfoaoAAoJEC0s7xA0khaEP/EP/A1SaOiRuMr6QfeBa6BWQxM+
SsmEl8iJpEzgnFYzNANe+dqhdOYKzFKQIWZCWSvMMG4TeCMiVZIkJP8IloZYxI/O
17m+WmPdmU8d2DSUfrWyH7oBeojXc4MoOX51uOVk7C5EvDXlW9y/RicN4FHycQ7k
WYD4R1FmklRI5Oswah+xNPlhI8mZqZrk6SBvKQwBGqnAoeaJO8ti55zoW9y4niVs
1dxHIYQpKDA3Lx9W1hEnNdmelFJcX0CoU3S0cebSIrnl/QEH3fG0NurNJRlMEVKn
BrNtl2aZ1KOMC8lWd4W2DHurYnPnZAmBz0GiL+W7Dh69qNivZ/dhhGu6N9k+IcKC
N0/ilRYS8+QYQGOqPqtYdNczt2BVOW9CcLlkRdkgUgr31H7gEku2AUHySNY7Dbv6
gACcf7BuZFygH58DQgC3+Utr/rVJlfWdhcP4rokpF1U026pGrn4glTDjyC5b1jDZ
2lKtgNIUsq50oniGq7YOoF8CG8HNRFFzBBcGhRWNM9jgchn9cAD21C+GWk01GCWq
A/K7jFqlo8XeIxFOmAWHMtBrw+bR40anl92Gq5iQf/G7y4dYE/weo6iv8iVBRCC+
b9WSa4ZtKjLIaOeHxaunR85TedQ2KWu5f28GI8vIPFNumu8oG7Www7Ipmd5Ir/eM
pEwWajcXuAIURaslHcD9
=WsFD
-----END PGP SIGNATURE-----

3
cmake-3.6.0.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:fd05ed40cc40ef9ef99fac7b0ece2e0b871858a82feade48546f5d2940147670
size 6897636

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Sun Jul 10 08:18:57 UTC 2016 - foss@grueninger.de
- update to CMake 3.6.0
no changes specific to CMake-GUI
full changelog: https://blog.kitware.com/cmake-3-6-0-available-for-download/
- update patch cmake-version-in-generated-files.patch
-------------------------------------------------------------------
Sun Jun 26 21:20:16 UTC 2016 - mpluskal@suse.com

View File

@ -17,15 +17,15 @@
Name: cmake-gui
Version: 3.5.2
Version: 3.6.0
Release: 0
Summary: CMake graphical user interface
License: BSD-3-Clause
Group: Development/Tools/Building
Url: http://www.cmake.org/
Source0: http://www.cmake.org/files/v3.5/cmake-%{version}.tar.gz
Source5: http://www.cmake.org/files/v3.5/cmake-%{version}-SHA-256.txt
Source6: http://www.cmake.org/files/v3.5/cmake-%{version}-SHA-256.txt.asc
Source0: http://www.cmake.org/files/v3.6/cmake-%{version}.tar.gz
Source5: http://www.cmake.org/files/v3.6/cmake-%{version}-SHA-256.txt
Source6: http://www.cmake.org/files/v3.6/cmake-%{version}-SHA-256.txt.asc
Source7: cmake.keyring
# PATCH-FIX-UPSTREAM form.patch -- set the correct include path for the ncurses includes
Patch4: form.patch

View File

@ -1,58 +1,32 @@
Enclosing the cmake version will cause a republish of generated files
---
Source/CPack/IFW/cmCPackIFWGenerator.cxx | 2 +-
Source/cmExportFileGenerator.cxx | 2 +-
Source/cmExportLibraryDependenciesCommand.cxx | 2 +-
Source/cmGlobalGhsMultiGenerator.cxx | 4 ++--
Source/cmGlobalNinjaGenerator.cxx | 4 +---
Source/cmLocalUnixMakefileGenerator3.cxx | 4 +---
6 files changed, 7 insertions(+), 11 deletions(-)
Index: cmake-3.4.3/Source/CPack/IFW/cmCPackIFWGenerator.cxx
===================================================================
--- cmake-3.4.3.orig/Source/CPack/IFW/cmCPackIFWGenerator.cxx
+++ cmake-3.4.3/Source/CPack/IFW/cmCPackIFWGenerator.cxx
@@ -614,7 +614,7 @@ cmCPackIFWPackage* cmCPackIFWGenerator::
//----------------------------------------------------------------------------
void cmCPackIFWGenerator::WriteGeneratedByToStrim(cmGeneratedFileStream &xout)
{
- xout << "<!-- Generated by CPack " << CMake_VERSION << " IFW generator "
+ xout << "<!-- Generated by CPack IFW generator "
<< "for QtIFW ";
if(IsVersionLess("2.0"))
{
Index: cmake-3.4.3/Source/cmExportFileGenerator.cxx
===================================================================
--- cmake-3.4.3.orig/Source/cmExportFileGenerator.cxx
+++ cmake-3.4.3/Source/cmExportFileGenerator.cxx
@@ -107,7 +107,7 @@ bool cmExportFileGenerator::GenerateImpo
std::ostream& os = *foutPtr;
--- cmake-3.6.0/Source/cmExportFileGenerator.cxx 2016-07-07 16:47:27.000000000 +0200
+++ cmake-3.6.0_patched/Source/cmExportFileGenerator.cxx 2016-07-10 09:43:06.902186709 +0200
@@ -93,7 +93,7 @@
// Protect that file against use with older CMake versions.
/* clang-format off */
- os << "# Generated by CMake " << cmVersion::GetCMakeVersion() << "\n\n";
+ os << "# Generated by CMake\n\n";
os << "if(\"${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}\" LESS 2.5)\n"
<< " message(FATAL_ERROR \"CMake >= 2.6.0 required\")\n"
<< "endif()\n";
Index: cmake-3.4.3/Source/cmExportLibraryDependenciesCommand.cxx
===================================================================
--- cmake-3.4.3.orig/Source/cmExportLibraryDependenciesCommand.cxx
+++ cmake-3.4.3/Source/cmExportLibraryDependenciesCommand.cxx
@@ -168,7 +168,7 @@ void cmExportLibraryDependenciesCommand:
diff -ru cmake-3.6.0/Source/cmExportLibraryDependenciesCommand.cxx cmake-3.6.0_patched/Source/cmExportLibraryDependenciesCommand.cxx
--- cmake-3.6.0/Source/cmExportLibraryDependenciesCommand.cxx 2016-07-07 16:47:27.000000000 +0200
+++ cmake-3.6.0_patched/Source/cmExportLibraryDependenciesCommand.cxx 2016-07-10 09:43:59.719118260 +0200
@@ -152,7 +152,7 @@
// versions.
const char* vertest =
"\"${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}\" GREATER 2.4";
- fout << "# Generated by CMake " << cmVersion::GetCMakeVersion() << "\n\n";
- fout << "# Generated by CMake " << cmVersion::GetCMakeVersion() << "\n\n";
+ fout << "# Generated by CMake\n\n";
fout << "if(" << vertest << ")\n";
fout << " # Information for CMake 2.6 and above.\n";
for(std::map<std::string, std::string>::const_iterator
Index: cmake-3.4.3/Source/cmGlobalGhsMultiGenerator.cxx
===================================================================
--- cmake-3.4.3.orig/Source/cmGlobalGhsMultiGenerator.cxx
+++ cmake-3.4.3/Source/cmGlobalGhsMultiGenerator.cxx
@@ -365,8 +365,8 @@ void cmGlobalGhsMultiGenerator::WriteDis
for (std::map<std::string, std::string>::const_iterator i =
diff -ru cmake-3.6.0/Source/cmGlobalGhsMultiGenerator.cxx cmake-3.6.0_patched/Source/cmGlobalGhsMultiGenerator.cxx
--- cmake-3.6.0/Source/cmGlobalGhsMultiGenerator.cxx 2016-07-07 16:47:27.000000000 +0200
+++ cmake-3.6.0_patched/Source/cmGlobalGhsMultiGenerator.cxx 2016-07-10 09:40:07.711043443 +0200
@@ -333,8 +333,8 @@
(*os) << "#" << std::endl
<< "# CMAKE generated file: DO NOT EDIT!" << std::endl
<< "# Generated by \"" << GetActualName() << "\""
@ -63,33 +37,41 @@ Index: cmake-3.4.3/Source/cmGlobalGhsMultiGenerator.cxx
<< "#" << std::endl;
}
Index: cmake-3.4.3/Source/cmGlobalNinjaGenerator.cxx
===================================================================
--- cmake-3.4.3.orig/Source/cmGlobalNinjaGenerator.cxx
+++ cmake-3.4.3/Source/cmGlobalNinjaGenerator.cxx
@@ -903,9 +903,7 @@
os
<< "# CMAKE generated file: DO NOT EDIT!\n"
<< "# Generated by \"" << this->GetName() << "\""
- << " Generator, CMake Version "
- << cmVersion::GetMajorVersion() << "."
- << cmVersion::GetMinorVersion() << "\n\n";
+ << " Generator, CMake\n\n";
diff -ru cmake-3.6.0/Source/cmGlobalNinjaGenerator.cxx cmake-3.6.0_patched/Source/cmGlobalNinjaGenerator.cxx
--- cmake-3.6.0/Source/cmGlobalNinjaGenerator.cxx 2016-07-07 16:47:27.000000000 +0200
+++ cmake-3.6.0_patched/Source/cmGlobalNinjaGenerator.cxx 2016-07-10 09:45:27.428670193 +0200
@@ -807,8 +807,7 @@
{
os << "# CMAKE generated file: DO NOT EDIT!\n"
<< "# Generated by \"" << this->GetName() << "\""
- << " Generator, CMake Version " << cmVersion::GetMajorVersion() << "."
- << cmVersion::GetMinorVersion() << "\n\n";
+ << " Generator, CMake\n\n";
}
void cmGlobalNinjaGenerator::AddDependencyToAll(cmGeneratorTarget* target)
Index: cmake-3.4.3/Source/cmLocalUnixMakefileGenerator3.cxx
===================================================================
--- cmake-3.4.3.orig/Source/cmLocalUnixMakefileGenerator3.cxx
+++ cmake-3.4.3/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -2111,9 +2111,7 @@ void cmLocalUnixMakefileGenerator3::Writ
os
<< "# CMAKE generated file: DO NOT EDIT!\n"
<< "# Generated by \"" << this->GlobalGenerator->GetName() << "\""
- << " Generator, CMake Version "
- << cmVersion::GetMajorVersion() << "."
- << cmVersion::GetMinorVersion() << "\n\n";
+ << " Generator, CMake\n\n";
diff -ru cmake-3.6.0/Source/cmLocalUnixMakefileGenerator3.cxx cmake-3.6.0_patched/Source/cmLocalUnixMakefileGenerator3.cxx
--- cmake-3.6.0/Source/cmLocalUnixMakefileGenerator3.cxx 2016-07-07 16:47:27.000000000 +0200
+++ cmake-3.6.0_patched/Source/cmLocalUnixMakefileGenerator3.cxx 2016-07-10 09:46:19.413592894 +0200
@@ -1878,8 +1878,7 @@
{
os << "# CMAKE generated file: DO NOT EDIT!\n"
<< "# Generated by \"" << this->GlobalGenerator->GetName() << "\""
- << " Generator, CMake Version " << cmVersion::GetMajorVersion() << "."
- << cmVersion::GetMinorVersion() << "\n\n";
+ << " Generator, CMake\n\n";
}
//----------------------------------------------------------------------------
std::string cmLocalUnixMakefileGenerator3::GetRecursiveMakeCall(
diff -ru cmake-3.6.0/Source/CPack/IFW/cmCPackIFWGenerator.cxx cmake-3.6.0_patched/Source/CPack/IFW/cmCPackIFWGenerator.cxx
--- cmake-3.6.0/Source/CPack/IFW/cmCPackIFWGenerator.cxx 2016-07-07 16:47:27.000000000 +0200
+++ cmake-3.6.0_patched/Source/CPack/IFW/cmCPackIFWGenerator.cxx 2016-07-10 09:41:34.316559270 +0200
@@ -560,7 +560,7 @@
void cmCPackIFWGenerator::WriteGeneratedByToStrim(cmXMLWriter& xout)
{
std::stringstream comment;
- comment << "Generated by CPack " << CMake_VERSION << " IFW generator "
+ comment << "Generated by CPack IFW generator "
<< "for QtIFW ";
if (IsVersionLess("2.0")) {
comment << "less 2.0";

View File

@ -1,3 +1,31 @@
-------------------------------------------------------------------
Sun Jul 10 08:13:00 UTC 2016 - foss@grueninger.de
- update to CMake 3.6.0
* The “list()” command gained a “FILTER” sub-command to filter
list elements by regular expression.
* A “CMAKE_TRY_COMPILE_TARGET_TYPE” variable was added to optionally
tell the “try_compile()” command to build a static library instead
of an executable.
* A “<LANG>_CLANG_TIDY” target property and supporting
“CMAKE_<LANG>_CLANG_TIDY” variable were introduced to tell the
Makefile Generators and the “Ninja” generator to run “clang-tidy”
along with the compiler for “C” and “CXX” languages.
* The “ExternalProject” module leared the “GIT_SHALLOW 1” option to
perform a shallow clone of a Git repository.
* The “ExternalProject” module learned to initialize Git submodules
recursively and also to initialize new submodules on updates.
* The “InstallRequiredSystemLibraries” module learned a new
“CMAKE_INSTALL_UCRT_LIBRARIES” option to enable app-local deployment
of the Windows Universal CRT libraries with Visual Studio 2015.
* The “Compile Features” functionality is now aware of features
supported by Intel C++ compilers versions 12.1 through 16.0 on UNIX
platforms.
* The “CMakeForceCompiler” module and its macros are now deprecated.
full changelog: https://blog.kitware.com/cmake-3-6-0-available-for-download/
- drop patch libarchive-version.patch which is included upstream
- update patch cmake-version-in-generated-files.patch
-------------------------------------------------------------------
Sun Jun 26 21:19:14 UTC 2016 - mpluskal@suse.com
@ -1080,7 +1108,6 @@ Wed May 14 15:42:17 UTC 2014 - hrvoje.senjan@gmail.com
* OS X: Fix Info.plist placement in a CFBundle
* Utilities/Sphinx: Port documentation generation to python3 (#14886)
-------------------------------------------------------------------
Thu Apr 24 23:08:48 UTC 2014 - hrvoje.senjan@gmail.com

View File

@ -17,19 +17,19 @@
Name: cmake
Version: 3.5.2
Version: 3.6.0
Release: 0
Summary: Cross-platform, open-source make system
License: BSD-3-Clause
Group: Development/Tools/Building
Url: http://www.cmake.org/
Source0: http://www.cmake.org/files/v3.5/%{name}-%{version}.tar.gz
Source0: http://www.cmake.org/files/v3.6/%{name}-%{version}.tar.gz
Source1: cmake.macros
# bnc#947585 - Let CMake produces automatic RPM provides
Source3: cmake.attr
Source4: cmake.prov
Source5: http://www.cmake.org/files/v3.5/%{name}-%{version}-SHA-256.txt
Source6: http://www.cmake.org/files/v3.5/%{name}-%{version}-SHA-256.txt.asc
Source5: http://www.cmake.org/files/v3.6/%{name}-%{version}-SHA-256.txt
Source6: http://www.cmake.org/files/v3.6/%{name}-%{version}-SHA-256.txt.asc
Source7: cmake.keyring
Patch2: cmake-fix-ruby-test.patch
# PATCH-FIX-UPSTREAM form.patch -- set the correct include path for the ncurses includes
@ -38,8 +38,6 @@ Patch4: form.patch
Patch5: system-libs.patch
# PATCH-FIX-SUSE cmake-version-in-generated-files.patch -- version number to be found in OBS
Patch6: cmake-version-in-generated-files.patch
# PATCH-FIX-UPSTREAM libarchive-version.patch -- Fix version detecting for libarchive 3.2
Patch7: libarchive-version.patch
BuildRequires: curl-devel
BuildRequires: fdupes
BuildRequires: gcc-c++
@ -72,7 +70,6 @@ echo "`grep %{name}-%{version}.tar.gz %{SOURCE5} | grep -Eo '^[0-9a-f]+'` %{SOU
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%build
export CXXFLAGS="%{optflags} -fPIE"
@ -85,9 +82,6 @@ export LDFLAGS="-Wl,--as-needed -Wl,--no-undefined -Wl,-z,now -pie"
--docdir=/share/doc/packages/%{name} \
--mandir=/share/man \
--system-libs \
%if 0%{?suse_version} <= 1110
--no-system-libarchive \
%endif
--no-system-jsoncpp \
--parallel=0%{jobs} \
--verbose \

View File

@ -1,32 +0,0 @@
From: Orion Poplawski <orion@cora.nwra.com>
Date: Fri, 3 Jun 2016 15:37:03 +0000 (-0600)
Subject: FindLibArchive: Support libarchive 3.2 version string format
X-Git-Url: https://cmake.org/gitweb?p=cmake.git;a=commitdiff_plain;h=38d18bab
FindLibArchive: Support libarchive 3.2 version string format
---
diff --git a/Modules/FindLibArchive.cmake b/Modules/FindLibArchive.cmake
index 471a4f1..dd93041 100644
--- a/Modules/FindLibArchive.cmake
+++ b/Modules/FindLibArchive.cmake
@@ -42,14 +42,15 @@ mark_as_advanced(LibArchive_INCLUDE_DIR LibArchive_LIBRARY)
# Extract the version number from the header.
if(LibArchive_INCLUDE_DIR AND EXISTS "${LibArchive_INCLUDE_DIR}/archive.h")
- # The version string appears in one of two known formats in the header:
+ # The version string appears in one of three known formats in the header:
# #define ARCHIVE_LIBRARY_VERSION "libarchive 2.4.12"
# #define ARCHIVE_VERSION_STRING "libarchive 2.8.4"
- # Match either format.
- set(_LibArchive_VERSION_REGEX "^#define[ \t]+ARCHIVE[_A-Z]+VERSION[_A-Z]*[ \t]+\"libarchive +([0-9]+)\\.([0-9]+)\\.([0-9]+)[^\"]*\".*$")
+ # #define ARCHIVE_VERSION_ONLY_STRING "3.2.0"
+ # Match any format.
+ set(_LibArchive_VERSION_REGEX "^#define[ \t]+ARCHIVE[_A-Z]+VERSION[_A-Z]*[ \t]+\"(libarchive +)?([0-9]+)\\.([0-9]+)\\.([0-9]+)[^\"]*\".*$")
file(STRINGS "${LibArchive_INCLUDE_DIR}/archive.h" _LibArchive_VERSION_STRING LIMIT_COUNT 1 REGEX "${_LibArchive_VERSION_REGEX}")
if(_LibArchive_VERSION_STRING)
- string(REGEX REPLACE "${_LibArchive_VERSION_REGEX}" "\\1.\\2.\\3" LibArchive_VERSION "${_LibArchive_VERSION_STRING}")
+ string(REGEX REPLACE "${_LibArchive_VERSION_REGEX}" "\\2.\\3.\\4" LibArchive_VERSION "${_LibArchive_VERSION_STRING}")
endif()
unset(_LibArchive_VERSION_REGEX)
unset(_LibArchive_VERSION_STRING)