I'm new to cmake, and I was building some c++11 code with it (notably a set of template aliases.) I want to use the CXX_STANDARD property to hopefully cover all platforms and problems introduced by simply adding -std=c++11 to cxxflags, which worked for me before:
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
But when I change this to
set_property(GLOBAL PROPERTY CXX_STANDARD 11)
set_property(GLOBAL PROPERTY CXX_STANDARD_REQUIRED true)
cmake doesn't tell the compiler to use c++11. What am I doing wrong with the latter code?