Force older language standard in CMake
CMake target_compile_features sets a transitive MINIMUM language standard necessary. If the compiler defaults to a newer language standard, target_compile_features() allows that default higher language standard.
target_compile_features(<target> PRIVATE cxx_std_98)
This can make issues for legacy code that requires an older language standard. For example, an old C++98 code may need to have the compiler in C++98 mode. This is accomplished with the target property CXX_STANDARD. Other languages may have a similar property e.g. C_STANDARD.
Example: if C++98 needed for old code:
set_property(TARGET old PROPERTY CXX_STANDARD 98)