[CMake] enabling c++11 features?

Rolf Eike Beer eike at sf-mail.de
Thu Jan 17 10:44:16 EST 2013


Am 17.01.2013 10:30, schrieb Witold E Wolski:
> I would like to use the override keyword
> I added to my root CMakeLists.txt file
> SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}  -std=c++0x") (I am using gcc 
> 4.6)
>
> However I am still getting an error i.e:
>
> error: ‘override’ does not name a type
>
> for the following declaration
>
> void getRT(std::vector<double> & rt) const override;

In this case you also need (for the reason already said by others):

add_definitions("-Doverride=")

Eike


More information about the CMake mailing list