Date: Tue, 6 Sep 2016 19:44:06 +0000 (UTC) From: Raphael Kubo da Costa <rakuco@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r421463 - in head/devel/extra-cmake-modules: . files Message-ID: <201609061944.u86Ji6o4096057@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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@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@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")
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201609061944.u86Ji6o4096057>