svn commit: r421463 - in head/devel/extra-cmake-modules: . files
Raphael Kubo da Costa
rakuco at FreeBSD.org
Tue Sep 6 19:44:07 UTC 2016
Author: rakuco
Date: Tue Sep 6 19:44:06 2016
New Revision: 421463
URL: https://svnweb.freebsd.org/changeset/ports/421463
Log:
Avoid passing -std=c++0x when it is not supported
Extend the check in KDECompilerSettings.cmake to only pass -std=c++0x to the
compiler if it's recent enough, otherwise we risk passing that to base GCC and
breaking the build of any extra-cmake-modules-dependent port using
KDECompilerSettings.cmake on FreeBSD 9 (such as multimedia/qt5-phonon4).
PR: 212427
Submitted by: rakuco
Approved by: yuri at rawbw.com (maintainer)
Added:
head/devel/extra-cmake-modules/files/patch-kde-modules_KDECompilerSettings.cmake (contents, props changed)
Modified:
head/devel/extra-cmake-modules/Makefile
Modified: head/devel/extra-cmake-modules/Makefile
==============================================================================
--- head/devel/extra-cmake-modules/Makefile Tue Sep 6 19:35:13 2016 (r421462)
+++ head/devel/extra-cmake-modules/Makefile Tue Sep 6 19:44:06 2016 (r421463)
@@ -4,6 +4,7 @@
PORTNAME= extra-cmake-modules
PORTVERSION= 5.25.0
DISTVERSIONPREFIX= v
+PORTREVISION= 1
CATEGORIES= devel
MAINTAINER= yuri at rawbw.com
Added: head/devel/extra-cmake-modules/files/patch-kde-modules_KDECompilerSettings.cmake
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/devel/extra-cmake-modules/files/patch-kde-modules_KDECompilerSettings.cmake Tue Sep 6 19:44:06 2016 (r421463)
@@ -0,0 +1,14 @@
+Make sure we only pass -std=c++0x if the compiler supports it (i.e. it is not base GCC).
+
+--- kde-modules/KDECompilerSettings.cmake.orig 2016-09-06 19:26:59 UTC
++++ kde-modules/KDECompilerSettings.cmake
+@@ -181,7 +181,8 @@ if (CMAKE_C_COMPILER_ID STREQUAL "GNU" O
+ # compilers (in particular, MSVC 2010 does not support C99)
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=iso9899:1990")
+ endif()
+-if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
++if ((CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "4.2.4") OR
++ CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
+ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Intel" AND NOT WIN32)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
More information about the svn-ports-head
mailing list