Am Mittwoch, 23. Oktober 2013 um 11:32:21, schrieb Kornel Benko <kornel.be...@berlin.de> > Am Mittwoch, 23. Oktober 2013 um 18:26:49, schrieb Wirz <s...@lukas-wirz.de> > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA1 > > > > Hi, > > > > Currently I can compile enblend only after applying the following patch. > > I'm on Debian 7.2 and g++ 4.7. > > > > cheers, lukas > > > > > > > > diff -r 1d9b6aaf284e CMakeLists.txt > > - --- a/CMakeLists.txt Mon Oct 21 09:30:22 2013 +0200 > > +++ b/CMakeLists.txt Wed Oct 23 18:21:58 2013 +1300 > > @@ -129,7 +129,7 @@ > > > > # Compiler specific tweaks and optimizations > > IF(CMAKE_COMPILER_IS_GNUCXX) > > - - SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 > > - -ffast-math -DNDEBUG -Wall") > > + SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 > > - -ffast-math -DNDEBUG -Wall -std=c++11") > > IF(APPLE AND CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION LESS 5) > > ## Add needed Compiler and Linker flags for OSX > > SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -flat_namespace -undefined > > suppress") > > > > Same here. This is due to last change in using 'nullptr' instead of 'NULL'. > Change: 958:1d9b6aaf284e, cspiel > Use some C++11 features: new keywords. > > Setting somewhere in CMakeLists.txt > add_definitions("-Dnullptr=NULL") > helps too. We have to find out, for which gcc-version should this be valid.
This should help: Kornel
diff -r 1d9b6aaf284e CMakeLists.txt --- a/CMakeLists.txt Mon Oct 21 09:30:22 2013 +0200 +++ b/CMakeLists.txt Wed Oct 23 11:53:17 2013 +0200 @@ -138,6 +138,15 @@ SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -flat_namespace -undefined suppress") SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -flat_namespace -undefined suppress") ENDIF(APPLE AND CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION LESS 5) + execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION) + message("GCC_VERSION = ${GCC_VERSION}") + if(GCC_VERSION VERSION_GREATER 4.7) + add_definitions("-std=gnu++11") + elseif(GCC_VERSION VERSION_GREATER 4.2) + add_definitions("-std=gnu++0x") + else() + add_definitions("-Dnullptr=NULL") + endif() ELSEIF(WIN32) IF(MSVC) # Quiet some compiler noise
signature.asc
Description: This is a digitally signed message part.