I\'m trying to run C++11 code in CLion but it doesn\'t work. It says:
... /projects/CLion/untitled/main.cpp:7:1: note: C++11 ‘constexpr’ only available w
I tried to set CMAKE_C_FLAGS
According to the documentation the CMAKE_C_FLAGS set C language flags for all build types. For C++ you need use CMAKE_CXX_FLAGS instead:
CMAKE_C_FLAGS
CMAKE_CXX_FLAGS
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")