Use the official way to set the C++ standard

https://cmake.org/cmake/help/latest/prop_tgt/CXX_STANDARD.html

It may also work in newer version of MSVC
This commit is contained in:
Steve Lhomme 2020-05-03 09:35:24 +02:00
parent 671e2b9864
commit 43d3639dbd
1 changed files with 2 additions and 0 deletions

View File

@ -8,6 +8,8 @@ target_include_directories(lzokay PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURC
target_link_libraries(lzokaytest lzokay)
target_compile_features(lzokay PRIVATE cxx_std_14)
target_compile_features(lzokaytest PRIVATE cxx_std_14)
set_target_properties(lzokay PROPERTIES CXX_STANDARD 14)
set_target_properties(lzokaytest PROPERTIES CXX_STANDARD 14)
# Set installation for headers
install(