MantisBT - CMake
View Issue Details
0015828CMakeCMakepublic2015-11-03 05:102016-06-10 14:31
Franz Reinhardt 
Kitware Robot 
normalmajoralways
closedmoved 
LinuxOpenSuse13.2
CMake 3.3.2 
 
0015828: Indexer doesn't work with C++11
*Environment*
cmake version 3.3.2
Eclipse IDE for C/C++ Developers 4.5.1.20150917-1200
gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/4.8/lto-wrapper
Target: x86_64-suse-linux
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,java,ada --enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.8 --enable-ssp --disable-libssp --disable-plugin --with-bugurl=http://bugs.opensuse.org/ [^] --with-pkgversion='SUSE Linux' --disable-libgcj --disable-libmudflap --with-slibdir=/lib64 --with-system-zlib --enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-version-specific-runtime-libs --enable-linker-build-id --enable-linux-futex --program-suffix=-4.8 --without-system-libunwind --with-arch-32=i586 --with-tune=generic --build=x86_64-suse-linux --host=x86_64-suse-linux
Thread model: posix
gcc version 4.8.3 20140627 [gcc-4_8-branch revision 212064] (SUSE Linux)

*Short description*
if
There's the source directory CmakeEclipseTest and an outof source build directory:
cd into the build directory and call (please correct the paths according the environment)
cmake -DCMAKE_ECLIPSE_VERSION=4.4 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX="/home/visionuser/CoreEngine-x86_64-Linux/main/CmakeEclipseTest/stage" -DCMAKE_PREFIX_PATH="/home/visionuser/CoreEngine-x86_64-Linux/Sandbox" -G "Eclipse CDT4 - Unix Makefiles" -DCMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT=TRUE /home/visionuser/CoreEngine-x86_64-Linux/main/CmakeEclipseTest

Then open eclipse and import the existing project in your workspace (the build project). Then open main.cpp and rebuild the index. The std::smart_ptr will show up red.
Most probably the creation of the .cproject file is done wrong:
<pathentry kind="mac" name="__cplusplus" path="" value="199711L"/>
Even when setting up the compiler to C++11 it creates the wrong __cplusplus
entry.

There are probably some duplicates of this bug, but their are related to different platforms, and they are still not fixed.
c++11, CDT, Eclipse
tgz CmakeEclipseTest.tgz (4,600) 2015-11-03 05:10
https://public.kitware.com/Bug/file/5562/CmakeEclipseTest.tgz
Issue History
2015-11-03 05:10Franz ReinhardtNew Issue
2015-11-03 05:10Franz ReinhardtFile Added: CmakeEclipseTest.tgz
2015-11-03 05:11Franz ReinhardtTag Attached: c++11
2015-11-03 05:11Franz ReinhardtTag Attached: CDT
2015-11-03 05:12Franz ReinhardtTag Attached: Eclipse
2016-06-10 14:29Kitware RobotNote Added: 0042877
2016-06-10 14:29Kitware RobotStatusnew => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:29Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0042877)
Kitware Robot   
2016-06-10 14:29   
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.