I see two main ways to do this in "modern" cmake:
set_property(TARGET target PROPERTY CXX_STANDARD 17)
or
target_compile_features(target PRIVATE cxx_std_17)
I understand that with target_compile_features, one can also specify a feature of the language version they want, rather than a specific version; it seems that it will also allow any version later than the one specified, so is possibly more flexible.
The former seems more common, however the latter seems to be considered the more modern, ideal way to do this.
Do either have any major advantages, or does it really just not matter?