[cmake-developers] [CMake 0013823]: Auto-include Clang default include paths in Eclipse CDT
Mantis Bug Tracker
mantis at public.kitware.com
Sun Dec 30 15:47:46 EST 2012
The following issue has been SUBMITTED.
======================================================================
http://public.kitware.com/Bug/view.php?id=13823
======================================================================
Reported By: SirHase
Assigned To:
======================================================================
Project: CMake
Issue ID: 13823
Category: CMake
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2012-12-30 15:47 EST
Last Modified: 2012-12-30 15:47 EST
======================================================================
Summary: Auto-include Clang default include paths in Eclipse
CDT
Description:
When generating a new Eclipse CDT project using CMake with Clang compiler
(/usr/bin/clang++), the project do not includes the default Clang
include/preprocessors symbols list, as it does when I use gcc.
Without the preprocessor symbols and include paths, Eclipse reports a lot of
false errors.
In Additional Information I talk about a solution, but may not be ideal because
requires extra steps, and the user needs to manually include the projects
compilation flags (-std=c++11 -stdlib=libc++).
Steps to Reproduce:
1) Create the first example from:
http://www.cmake.org/cmake/help/cmake_tutorial.html
2) Generate a Eclipse CDT project, specify native compiler to /usr/bin/clang and
/usr/bin/clang++ for C and C++ respectively
3) Import this new project in Eclipse
4) Check the include paths, it should be empty
Additional Information:
Software used:
Eclise IDE Version: Juno Service Release 1. Build id: 20121004-1855
Eclise CDT Version: 8.1.1.201209170703
Clang: 3.1 (branches/release_31) x86_64-pc-linux-gnu
--
Adding the include paths manually may not work because Eclipse can "forget" it
after a restart.
--
Using Eclipse automatic path/symbols list discovery solution:
Setting the discovery command to: "/usr/bin/clang++ -E -P -v -dD
${plugin_state_location}/${specs_file} -std=c++11 -stdlib=libc++"(here I use
C++11, so each environment will have it different, cant use CMake flags) then in
"C/C++ Project Paths" -> "Path Containers" add paths/symbols with this
discovery. This way, Eclipse preserves both CMake and default Clang
includes/symbols.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2012-12-30 15:47 SirHase New Issue
======================================================================
More information about the cmake-developers
mailing list