|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0015102||CMake||CMake||public||2014-08-23 04:52||2016-06-10 14:31|
|Assigned To||Alex Neundorf|
|Product Version||CMake 3.0.1|
|Target Version||Fixed in Version|
|Summary||0015102: Eclipse CDT generator produces incorrect CDT indexer configuration when calling with any custom compiler switches|
I found a problem with Eclipse CDT project generator. Specifically, the CMake is unable to create a completely filled include/symbol list for the CDT indexer when using GCC flags that modify the built-in preprocessor symbol list. Examples are "-std=c++11" (enable C++11 support) or "-msse4.1" (enable SSE4.1 SIMD instruction set). I wrote a self-containing example that exposes the issue.
For some reason, CMake does not add compile options that I specify through target_compile_options() to the argument list for the GCC symbol query call. It does however include the definitions added via add_definitions(). I think this should be fixed.
One way to walk around it is to pass the compiler flags to GCC via CMAKE_CXX_COMPILER_ARG1 which is used during symbol query. But this is A) hacky B) seem to affect all other files in the project C) only allows to specify *a single* compiler switch. The C) is particularly weird...
|Steps To Reproduce||1. Download the archive attached to the bug report|
2. Set up an Eclipse project in the directory where CMakeLists.txt is, e.g., "cmake -G"Eclipse CDT4 - Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_ECLIPSE_VERSION=4.3"
3. Import the project to Eclipse
4. Look at the indexer failing in two main points:
A) Unrecognized std::function<> -- this template is in C++11 -- it is not visible because CMake does not pass -std=c++11 to the compiler when dumping the preprocessor variables for the indexer.
B) Unrecognized SIMD intrinsics despite #include <smmintrin.h> -- same as above -- "-msse4.1" switch has not been passed to the compiler during query. The indexer is missing (normally automatically generated) __SSE4__, __SSE4_1__, __SSSE3__, __SSE3__ keywords, and cannot correctly include header with intrinsics.
Both problems are also exposed when inspecting what symbols were actually imported when creating the project. See "C/C++ Include Paths and Symbols" in Project properties...
|Additional Information||I use Eclipse Luna (4.4), but I don't think it really matter for this bug.|
|Tags||No tags attached.|
|Attached Files||test.tar.bz2 [^] (759 bytes) 2014-08-23 04:52|
Kitware Robot (administrator)
Resolving issue as `moved`.
This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.
|2014-08-23 04:52||David Pajak||New Issue|
|2014-08-23 04:52||David Pajak||File Added: test.tar.bz2|
|2014-08-23 11:27||Alex Neundorf||Assigned To||=> Alex Neundorf|
|2014-08-23 11:27||Alex Neundorf||Status||new => assigned|
|2016-06-10 14:29||Kitware Robot||Note Added: 0042611|
|2016-06-10 14:29||Kitware Robot||Status||assigned => resolved|
|2016-06-10 14:29||Kitware Robot||Resolution||open => moved|
|2016-06-10 14:31||Kitware Robot||Status||resolved => closed|
|Copyright © 2000 - 2018 MantisBT Team|