From 40794f8e15f73ab0834b98691648ab9ddef4a0ac Mon Sep 17 00:00:00 2001 From: Hombre Date: Sat, 3 Sep 2016 21:44:02 +0200 Subject: [PATCH] Add full support of c++11 to the Eclipse IDE ...(i.e. including when building the index), with the help of -DCMAKE_ECLIPSE_VERSION="4.6.0" (set to your version, of course) on the command line. Without this, the declared symbols are wrong and c++11 is not supported by the IDE (vs the build makefiles). --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index e4ecf0903..ad0bd2e16 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,13 @@ else (WIN32) cmake_minimum_required(VERSION 2.6) endif (WIN32) +# must stay before the 'project' command +if(${CMAKE_EXTRA_GENERATOR} MATCHES "Eclipse CDT4") + set(CMAKE_CXX_COMPILER_ARG1 "-std=c++11" CACHE STRING "C++ version for eclipse" FORCE) + # users building with Eclipse should set CMAKE_ECLIPSE_VERSION through the command line to their current version of Eclipse + #set(CMAKE_ECLIPSE_VERSION "4.6.0" CACHE STRING "Eclipse version" FORCE) +endif() + PROJECT(RawTherapee) # the default target is 'Debug'