Editorial question26.9K views1,418 votes0 answers2,291 following
AI-generatedInterface library CMAKE_CXX_STANDARD propagation to dependent targets in multi-config generators
An interface library declares CMAKE_CXX_STANDARD 17 and exposes compile features through INTERFACE_COMPILE_FEATURES. Dependent executables link against it. The goal is for every consumer to inherit the same C++ standard flag in both Debug and Release configurations when using Visual Studio or Xcode. This assumes CMake 3.8 through 3.28. CMake evaluates CMAKE_