autotidy
autotidy copied to clipboard
Add `target_compile_feature` command to `CMakeLists.txt`
This commands pass required C++14 standard flag to compiler.
C++14 is set using a global property at the top of the CMakeLists.txt so I don't see a need for it to be set for each target ?
The target_compile_features
pass -std=c++14
to compiler.
And the doc of CXX_STANDARD_REQUIRED says:
For compilers that have no notion of a standard level, such as MSVC, this has no effect.
Is this a real problem for MSVC ? I don't see anything in the documentation that implies CMAKE_CXX_STANDARD
is weaker than target_compile_features(cxx_std_)
and I prefer to apply possibly ABI breaking stuff globally.