1
0
Fork 0
mirror of https://github.com/TheLartians/ModernCppStarter.git synced 2025-08-30 21:51:12 +02:00

use generic expression as recommended

This commit is contained in:
ClausKlein 2021-02-14 14:52:17 +01:00
parent 55fe93a2c3
commit 5e5b4f8178

View file

@ -53,13 +53,11 @@ file(GLOB_RECURSE sources CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/source/
# target! EITHER: add_library(Greeter INTERFACE) OR:
add_library(Greeter ${headers} ${sources})
# EITHER: set_target_properties(Greeter PROPERTIES CXX_STANDARD ${CMAKE_CXX_STANDARD}) # OR
# EITHER: set_target_properties(Greeter PROPERTIES CXX_STANDARD 17) # OR:
target_compile_features(Greeter PUBLIC cxx_std_17)
# being a cross-platform target, we enforce standards conformance on MSVC
if(MSVC)
target_compile_options(Greeter PUBLIC /permissive)
endif()
target_compile_options(Greeter PUBLIC "$<$<COMPILE_LANG_AND_ID:CXX,MSVC>:/permissive>")
# Link dependencies EITHER: target_link_libraries(Greeter PRIVATE
# $<BUILD_INTERFACE:fmt::fmt-header-only>) # OR: