pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/devel/cmake
Module Name: pkgsrc
Committed By: maya
Date: Wed Feb 27 13:18:01 UTC 2019
Modified Files:
pkgsrc/devel/cmake: Makefile distinfo
pkgsrc/devel/cmake/patches: patch-Source_Checks_cm_cxx_features.cmake
Added Files:
pkgsrc/devel/cmake/files: Source_Checks_cm_cxx_cbegin.cxx
Source_Checks_cm_cxx_cend.cxx Source_Checks_cm_cxx_size_t.cxx
pkgsrc/devel/cmake/patches: patch-Source_cmAlgorithms.h
Log Message:
cmake: specifically test for some C++17 features.
In case the compiler used advertises C++17 but uses a C++ library that
lacks some features, we'll need specific testing.
Unbreaks the build for: libstdc++ from 5.4 and clang 7.0
Submitted upstream: https://gitlab.kitware.com/cmake/cmake/merge_requests/3030/diffs
(No response yet)
>From wizermil.
To generate a diff of this commit:
cvs rdiff -u -r1.159 -r1.160 pkgsrc/devel/cmake/Makefile
cvs rdiff -u -r1.135 -r1.136 pkgsrc/devel/cmake/distinfo
cvs rdiff -u -r0 -r1.1 \
pkgsrc/devel/cmake/files/Source_Checks_cm_cxx_cbegin.cxx \
pkgsrc/devel/cmake/files/Source_Checks_cm_cxx_cend.cxx \
pkgsrc/devel/cmake/files/Source_Checks_cm_cxx_size_t.cxx
cvs rdiff -u -r1.2 -r1.3 \
pkgsrc/devel/cmake/patches/patch-Source_Checks_cm_cxx_features.cmake
cvs rdiff -u -r0 -r1.1 pkgsrc/devel/cmake/patches/patch-Source_cmAlgorithms.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/devel/cmake/Makefile
diff -u pkgsrc/devel/cmake/Makefile:1.159 pkgsrc/devel/cmake/Makefile:1.160
--- pkgsrc/devel/cmake/Makefile:1.159 Tue Jan 15 09:02:28 2019
+++ pkgsrc/devel/cmake/Makefile Wed Feb 27 13:18:01 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.159 2019/01/15 09:02:28 adam Exp $
+# $NetBSD: Makefile,v 1.160 2019/02/27 13:18:01 maya Exp $
.include "Makefile.version"
@@ -52,6 +52,9 @@ SUBST_FILES.cmake+= Modules/Platform/Uni
SUBST_VARS.cmake= LOCALBASE X11BASE
pre-configure:
+ ${CP} ${FILESDIR}/Source_Checks_cm_cxx_cbegin.cxx ${WRKSRC}/Source/Checks/cm_cxx_cbegin.cxx
+ ${CP} ${FILESDIR}/Source_Checks_cm_cxx_cend.cxx ${WRKSRC}/Source/Checks/cm_cxx_cend.cxx
+ ${CP} ${FILESDIR}/Source_Checks_cm_cxx_size_t.cxx ${WRKSRC}/Source/Checks/cm_cxx_size_t.cxx
${RM} -f ${WRKSRC}/Modules/*.orig ${WRKSRC}/Modules/Compiler/*.orig ${WRKSRC}/Modules/Platform/*.orig
${LN} -f ${WRKSRC}/Modules/Platform/OpenBSD.cmake ${WRKSRC}/Modules/Platform/MirBSD.cmake
.for lang in C CXX Fortran
Index: pkgsrc/devel/cmake/distinfo
diff -u pkgsrc/devel/cmake/distinfo:1.135 pkgsrc/devel/cmake/distinfo:1.136
--- pkgsrc/devel/cmake/distinfo:1.135 Tue Feb 5 09:52:23 2019
+++ pkgsrc/devel/cmake/distinfo Wed Feb 27 13:18:01 2019
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.135 2019/02/05 09:52:23 adam Exp $
+$NetBSD: distinfo,v 1.136 2019/02/27 13:18:01 maya Exp $
SHA1 (cmake-3.13.4.tar.gz) = 242ac4986ab38ddb06c7bfb7eb950e4c1b1ca770
RMD160 (cmake-3.13.4.tar.gz) = 6211b5315071015d2a949af077e4301c47e36fd4
@@ -16,7 +16,8 @@ SHA1 (patch-Source_CMakeLists.txt) = 533
SHA1 (patch-Source_Checks_Curses_CMakeLists.txt) = 37d95c6162cc1f4c0e47b537ac8204cb9fe75b8c
SHA1 (patch-Source_Checks_Curses_CheckCurses.c) = c86cae48f7b39fb735eba4788d4e9d595b2ccf3b
SHA1 (patch-Source_Checks_cm__cxx17__check.cpp) = 35817b7ad4c43d8f82300c21a9fb76166325de97
-SHA1 (patch-Source_Checks_cm_cxx_features.cmake) = 3d6e3ac6ad25890d223601c15fb208b8e77ff77c
+SHA1 (patch-Source_Checks_cm_cxx_features.cmake) = 2ba746a927765361738914bf1d00ba191a2e849f
SHA1 (patch-Source_CursesDialog_ccmake.cxx) = d7baafe6612b6ac9b0542ed10ffcf90cd8d1df87
+SHA1 (patch-Source_cmAlgorithms.h) = 9a9e997af5af78d004ff62d86cba5070cd5470ff
SHA1 (patch-Utilities_KWIML_CMakeLists.txt) = e4bdf9fc58757e87bf7e3e3e195839eededbc796
SHA1 (patch-bootstrap) = 9d99cfe9f9ae826250f94bc297f5a22b8de09e84
Index: pkgsrc/devel/cmake/patches/patch-Source_Checks_cm_cxx_features.cmake
diff -u pkgsrc/devel/cmake/patches/patch-Source_Checks_cm_cxx_features.cmake:1.2 pkgsrc/devel/cmake/patches/patch-Source_Checks_cm_cxx_features.cmake:1.3
--- pkgsrc/devel/cmake/patches/patch-Source_Checks_cm_cxx_features.cmake:1.2 Sat Jul 21 06:52:55 2018
+++ pkgsrc/devel/cmake/patches/patch-Source_Checks_cm_cxx_features.cmake Wed Feb 27 13:18:01 2019
@@ -1,4 +1,4 @@
-$NetBSD: patch-Source_Checks_cm_cxx_features.cmake,v 1.2 2018/07/21 06:52:55 ryoon Exp $
+$NetBSD: patch-Source_Checks_cm_cxx_features.cmake,v 1.3 2019/02/27 13:18:01 maya Exp $
Ignore warnings like ...
@@ -6,7 +6,12 @@ Ignore warnings like ...
... caused by recent version of Xcode which break C++11 detection under macOS.
---- Source/Checks/cm_cxx_features.cmake.orig 2018-07-17 11:29:00.000000000 +0000
+
+Handle mismatch between C++ compiler and C++ library by checking for C++17 features
+(std::size, std::cend, std::cbegin)
+https://gitlab.kitware.com/cmake/cmake/merge_requests/3030/diffs
+
+--- Source/Checks/cm_cxx_features.cmake.orig 2019-02-01 13:35:27.000000000 +0000
+++ Source/Checks/cm_cxx_features.cmake
@@ -21,6 +21,7 @@ function(cm_check_cxx_feature name)
string(REGEX REPLACE "[^\n]*warning:[^\n]*-Winvalid-command-line-argument[^\n]*" "" check_output "${check_output}")
@@ -16,3 +21,22 @@ Ignore warnings like ...
string(REGEX REPLACE "[^\n]*warning:[^\n]*object file compiled with -mlong-branch which is no longer needed[^\n]*" "" check_output "${check_output}")
# Filter out xcodebuild warnings.
string(REGEX REPLACE "[^\n]* xcodebuild\\[[0-9]*:[0-9]*\\] warning: [^\n]*" "" check_output "${check_output}")
+@@ -51,3 +52,18 @@ if(CMake_HAVE_CXX_MAKE_UNIQUE)
+ set(CMake_HAVE_CXX_UNIQUE_PTR 1)
+ endif()
+ cm_check_cxx_feature(unique_ptr)
++
++cm_check_cxx_feature(size_t)
++if(CMake_HAVE_CXX_SIZE_T)
++ set(CMake_HAVE_CXX_SIZE_T 1)
++endif()
++
++cm_check_cxx_feature(cbegin)
++if(CMake_HAVE_CXX_CBEGIN)
++ set(CMake_HAVE_CXX_CBEGIN 1)
++endif()
++
++cm_check_cxx_feature(cend)
++if(CMake_HAVE_CXX_CEND)
++ set(CMake_HAVE_CXX_CEND 1)
++endif()
Added files:
Index: pkgsrc/devel/cmake/files/Source_Checks_cm_cxx_cbegin.cxx
diff -u /dev/null pkgsrc/devel/cmake/files/Source_Checks_cm_cxx_cbegin.cxx:1.1
--- /dev/null Wed Feb 27 13:18:01 2019
+++ pkgsrc/devel/cmake/files/Source_Checks_cm_cxx_cbegin.cxx Wed Feb 27 13:18:01 2019
@@ -0,0 +1,7 @@
+#include <iterator>
+int main()
+{
+ int a[] = { 0, 1, 2 };
+ auto ai = std::cbegin(a);
+ return *ai;
+}
Index: pkgsrc/devel/cmake/files/Source_Checks_cm_cxx_cend.cxx
diff -u /dev/null pkgsrc/devel/cmake/files/Source_Checks_cm_cxx_cend.cxx:1.1
--- /dev/null Wed Feb 27 13:18:01 2019
+++ pkgsrc/devel/cmake/files/Source_Checks_cm_cxx_cend.cxx Wed Feb 27 13:18:01 2019
@@ -0,0 +1,7 @@
+#include <iterator>
+int main()
+{
+ int a[] = { 2, 1, 0 };
+ auto ai = std::cend(a);
+ return *(ai - 1);
+}
Index: pkgsrc/devel/cmake/files/Source_Checks_cm_cxx_size_t.cxx
diff -u /dev/null pkgsrc/devel/cmake/files/Source_Checks_cm_cxx_size_t.cxx:1.1
--- /dev/null Wed Feb 27 13:18:01 2019
+++ pkgsrc/devel/cmake/files/Source_Checks_cm_cxx_size_t.cxx Wed Feb 27 13:18:01 2019
@@ -0,0 +1,6 @@
+#include <cstddef>
+int main()
+{
+ std::size_t t = 0;
+ return static_cast<int>(t);
+}
Index: pkgsrc/devel/cmake/patches/patch-Source_cmAlgorithms.h
diff -u /dev/null pkgsrc/devel/cmake/patches/patch-Source_cmAlgorithms.h:1.1
--- /dev/null Wed Feb 27 13:18:01 2019
+++ pkgsrc/devel/cmake/patches/patch-Source_cmAlgorithms.h Wed Feb 27 13:18:01 2019
@@ -0,0 +1,53 @@
+$NetBSD: patch-Source_cmAlgorithms.h,v 1.1 2019/02/27 13:18:01 maya Exp $
+
+Handle mismatch between C++ compiler and C++ library by checking for C++17 features
+(std::size, std::cend, std::cbegin)
+https://gitlab.kitware.com/cmake/cmake/merge_requests/3030/diffs
+
+--- Source/cmAlgorithms.h.orig 2019-02-01 13:35:27.000000000 +0000
++++ Source/cmAlgorithms.h
+@@ -367,7 +367,8 @@ std::unique_ptr<T> make_unique(Args&&...
+
+ #endif
+
+-#if __cplusplus >= 201703L || defined(_MSVC_LANG) && _MSVC_LANG >= 201703L
++#if defined(CMake_HAVE_CXX_SIZE_T) || \
++ defined(_MSVC_LANG) && _MSVC_LANG >= 201703L
+
+ using std::size;
+
+@@ -396,14 +397,14 @@ constexpr
+
+ #endif
+
+-#if __cplusplus >= 201402L || defined(_MSVC_LANG) && _MSVC_LANG >= 201402L
++#if defined(CMake_HAVE_CXX_CBEGIN) || \
++ defined(_MSVC_LANG) && _MSVC_LANG >= 201402L
+
+ using std::cbegin;
+-using std::cend;
+
+ #else
+
+-// std::c{begin,end} backport from C++14
++// std::cbegin backport from C++14
+ template <class C>
+ # if defined(_MSC_VER) && _MSC_VER < 1900
+ auto cbegin(C const& c)
+@@ -415,6 +416,16 @@ constexpr auto cbegin(C const& c) noexce
+ return std::begin(c);
+ }
+
++#endif
++
++#if defined(CMake_HAVE_CXX_CEND) || \
++ defined(_MSVC_LANG) && _MSVC_LANG >= 201402L
++
++using std::cend;
++
++#else
++
++// std::cend backport from C++14
+ template <class C>
+ # if defined(_MSC_VER) && _MSC_VER < 1900
+ auto cend(C const& c)
Home |
Main Index |
Thread Index |
Old Index