Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » C++11 CMake based project no support in indexer
C++11 CMake based project no support in indexer [message #1248055] Sun, 16 February 2014 23:03 Go to next message
adrian hodos is currently offline adrian hodosFriend
Messages: 2
Registered: February 2014
Junior Member
I have a CMake generated eclipse project. Is there any way to enable C++11 support for the indexer in this scenario (compiler flags are set in the CMakeLists.txt file and I can't find any options in the project settings to enable C++11 support).
Re: C++11 CMake based project no support in indexer [message #1251632 is a reply to message #1248055] Thu, 20 February 2014 12:34 Go to previous messageGo to next message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
https://wiki.eclipse.org/CDT/User/FAQ#CDT_does_not_recognize_C.2B.2B11_features

Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: C++11 CMake based project no support in indexer [message #1251900 is a reply to message #1248055] Thu, 20 February 2014 18:22 Go to previous messageGo to next message
adrian hodos is currently offline adrian hodosFriend
Messages: 2
Registered: February 2014
Junior Member
It still doesn't work, I get no completions for c++11 stuff.
  • Attachment: cpp_settings.png
    (Size: 93.28KB, Downloaded 523 times)
  • Attachment: code.png
    (Size: 105.65KB, Downloaded 484 times)
Re: C++11 CMake based project no support in indexer [message #1404521 is a reply to message #1251900] Sat, 02 August 2014 21:08 Go to previous message
Kamil Saigol is currently offline Kamil SaigolFriend
Messages: 7
Registered: July 2014
Junior Member
In addition to what you did, use the "Dialect" option under Project Properties -> C++ Build -> Settings -> GCC C++ Compiler (or whatever your toolchain compiler is).

If the dialect option isn't there, add -std=c++11 to "Miscellaneous" under GCC C++ Compiler and GCC C++ Linker.

Finally, does adding the following to the main CMakeLists.txt file help at all?

if (${CMAKE_EXTRA_GENERATOR} MATCHES "Eclipse CDT4")
	add_definitions (-DCMAKE_CXX_COMPILER_ARG1=-std=c++11)
	add_definitions (-DCMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT=TRUE)
endif (${CMAKE_EXTRA_GENERATOR} MATCHES "Eclipse CDT4")

[Updated on: Sat, 02 August 2014 21:12]

Report message to a moderator

Previous Topic:Eclipse Luna, MinGW-w64 -- C++11 <random>
Next Topic:Auto Code Assist in Luna 8.4 (without ctrl + space)
Goto Forum:
  


Current Time: Thu Oct 10 21:30:19 GMT 2024

Powered by FUDForum. Page generated in 0.04478 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top