Hmm, @mikeferguson suggests something a bit different than just removing the C++ standard flag

# Default to C++17
if(NOT CMAKE_CXX_STANDARD)
  set(CMAKE_CXX_STANDARD 17)
endif()

Is one or the other preferred?

I usually use 3.10.2 as that is the version that still works with Melodic and is relatively modern at the same time.

2 Likes