The following issue has been SUBMITTED.
======================================================================
http://public.kitware.com/Bug/view.php?id=15316
======================================================================
Reported By: lucaghera
Assigned To:
======================================================================
Project: CMake
Issue ID: 15316
Category: CMake
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2014-12-18 08:46 EST
Last Modified: 2014-12-18 08:46 EST
======================================================================
Summary: Generation of Eclipse project does not provide
support for c++ 11
Description:
I’m writing a CMake file for a project that should be compiled both in Ubuntu
and OS X.
I want to use eclipse as IDE, gcc and C++ 11.
I read different threads that suggest how to enable C++ 11 in eclipse.
According to them I included these lines in my CMake:
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall")
if (${CMAKE_EXTRA_GENERATOR} MATCHES "Eclipse CDT4")
set(CMAKE_CXX_COMPILER_ARG1 "-std=c++11" CACHE STRING "C++ version for
eclipse"
FORCE)
set(CMAKE_ECLIPSE_VERSION "4.3" CACHE STRING "Eclipse version" FORCE)
endif (${CMAKE_EXTRA_GENERATOR} MATCHES "Eclipse CDT4”)
However, eclipse still set a wrong value for the symbol __cplusplus (199711L
instead of 201103L I guess). In the generated file .cproject this should be the
line <pathentry kind="mac" name="__cplusplus" path="" value="199711L"/> (in my
case 265)
For this reason eclipse is not able to index C++ 11 features such as shared
pointer.
Therefore I get a syntax error also if the code compiles.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2014-12-18 08:46 lucaghera New Issue
======================================================================
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers