From kde-edu Sat Jan 18 00:27:33 2014 From: Frederik Gladhorn Date: Sat, 18 Jan 2014 00:27:33 +0000 To: kde-edu Subject: Re: [kig] /: Enable C++11 Message-Id: <2089323.qIbRAM6uLm () anton> X-MARC-Message: https://marc.info/?l=kde-edu&m=139000487615419 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============3617383117046701496==" This is a multi-part message in MIME format. --===============3617383117046701496== Content-Type: multipart/alternative; boundary="nextPart2649168.Jl99Jtjed6" Content-Transfer-Encoding: 7Bit This is a multi-part message in MIME format. --nextPart2649168.Jl99Jtjed6 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" On Wednesday 15. January 2014 03.39.06 David E. Narvaez wrote: > Git commit c5d019558f0fa230fde09ea6df38f184928062ea by David E. Narvaez. > Committed on 14/01/2014 at 22:46. > Pushed by narvaez into branch 'master'. > > Enable C++11 > > I promise I'll be nice :) > > CC: kde-edu@kde.org > > M +4 -0 CMakeLists.txt > > http://commits.kde.org/kig/c5d019558f0fa230fde09ea6df38f184928062ea > > diff --git a/CMakeLists.txt b/CMakeLists.txt > index f2e916c..2785eb2 100644 > --- a/CMakeLists.txt > +++ b/CMakeLists.txt > @@ -25,6 +25,10 @@ include(MacroBoolTo01) > add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS} > -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS) > include_directories (${QDBUS_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR} > ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES}) > > +if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR > CMAKE_CXX_COMPILER_ID STREQUAL "Intel") + set(CMAKE_CXX_FLAGS > "${CMAKE_CXX_FLAGS} -std=c++11") > +endif() Are you sure this is a good idea? Older versions of these compilers do not support C++11, so your logic is flawed. If at all you'd have to also check for versions and even if there is C++11 support, it varies which features are implemented. I'd suggest you take a look at qtbase/src/corelib/global/qcompilerdetection.h in Qt 5 if you really want to go in this direction. Cheers, Frederik > + > kde4_no_enable_final(kig) > > find_package(BoostPython) > _______________________________________________ > kde-edu mailing list > kde-edu@mail.kde.org > https://mail.kde.org/mailman/listinfo/kde-edu --nextPart2649168.Jl99Jtjed6 Content-Transfer-Encoding: 7Bit Content-Type: text/html; charset="us-ascii"

On Wednesday 15. January 2014 03.39.06 David E. Narvaez wrote:

> Git commit c5d019558f0fa230fde09ea6df38f184928062ea by David E. Narvaez.

> Committed on 14/01/2014 at 22:46.

> Pushed by narvaez into branch 'master'.

>

> Enable C++11

>

> I promise I'll be nice :)

>

> CC: kde-edu@kde.org

>

> M +4 -0 CMakeLists.txt

>

> http://commits.kde.org/kig/c5d019558f0fa230fde09ea6df38f184928062ea

>

> diff --git a/CMakeLists.txt b/CMakeLists.txt

> index f2e916c..2785eb2 100644

> --- a/CMakeLists.txt

> +++ b/CMakeLists.txt

> @@ -25,6 +25,10 @@ include(MacroBoolTo01)

> add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS}

> -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)

> include_directories (${QDBUS_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}

> ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES})

>

> +if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR

> CMAKE_CXX_COMPILER_ID STREQUAL "Intel") + set(CMAKE_CXX_FLAGS

> "${CMAKE_CXX_FLAGS} -std=c++11")

> +endif()

 

Are you sure this is a good idea?

Older versions of these compilers do not support C++11, so your logic is flawed. If at all you'd have to also check for versions and even if there is C++11 support, it varies which features are implemented.

 

I'd suggest you take a look at qtbase/src/corelib/global/qcompilerdetection.h in Qt 5 if you really want to go in this direction.

 

Cheers,

Frederik

 

> +

> kde4_no_enable_final(kig)

>

> find_package(BoostPython)

> _______________________________________________

> kde-edu mailing list

> kde-edu@mail.kde.org

> https://mail.kde.org/mailman/listinfo/kde-edu

 

--nextPart2649168.Jl99Jtjed6-- --===============3617383117046701496== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ kde-edu mailing list kde-edu@mail.kde.org https://mail.kde.org/mailman/listinfo/kde-edu --===============3617383117046701496==--