The previous approach, in the presence of existing CXX flags, resulted
in a broken CMAKE_CXX_FLAGS value with a ; in the middle. The
canonical way of adding a compile option is to use the cmake function
add_compile_options, which is available from 2.8.12 onwards.
If you need something compatible with cmake 2.8.11 and prior, you can
use add_definitions(-std=c++0x) instead.
The previous approach, in the presence of existing CXX flags, resulted in a broken CMAKE_CXX_FLAGS value with a
;
in the middle. The canonical way of adding a compile option is to use the cmake functionadd_compile_options
, which is available from 2.8.12 onwards.If you need something compatible with cmake 2.8.11 and prior, you can use
add_definitions(-std=c++0x)
instead.