nixprime / cpsm

A CtrlP matcher, specialized for paths.
Apache License 2.0
202 stars 19 forks source link

Correct append of -std to CXX flags #46

Closed mqudsi closed 6 years ago

mqudsi commented 6 years ago

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.