Modern CMake propose an interface for this purpose target_compile_features.
Documentation is here: Requiring Language Standards
Use it like this:
target_compile_features(${TARGET_NAME} PRIVATE cxx_std_17)
Modern CMake propose an interface for this purpose target_compile_features.
Documentation is here: Requiring Language Standards
Use it like this:
target_compile_features(${TARGET_NAME} PRIVATE cxx_std_17)