My Dockerfile uses FROM gcc:5
, runs apt-get update and installs CMake v3.9 via wget
. My top-level CMakeLists.txt
has set(CMAKE_CXX_STANDARD 11)
but that doesn't seem to convince gcc to compile using C++11 as I get the following error:
/ifeature.hpp:51:42: error: 'shared_ptr' in namespace 'std' does not name a template type
virtual float compare(const std::shared_ptr<IFeature>& feature) const = 0
^
I tried adding variations of set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
with libstdc++
, gnuc++11
etc. but the compiler does not recognize them. I also tried add_compile_options(-std=c++11)
to no avail. I also tried apt-get upgrade gcc but that didn't help either.
What am I missing here?