mirror of
https://github.com/TheLartians/ModernCppStarter.git
synced 2025-08-31 22:21:13 +02:00
use generic expression as recommended
This commit is contained in:
parent
55fe93a2c3
commit
5e5b4f8178
1 changed files with 2 additions and 4 deletions
|
@ -53,13 +53,11 @@ file(GLOB_RECURSE sources CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/source/
|
||||||
# target! EITHER: add_library(Greeter INTERFACE) OR:
|
# target! EITHER: add_library(Greeter INTERFACE) OR:
|
||||||
add_library(Greeter ${headers} ${sources})
|
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)
|
target_compile_features(Greeter PUBLIC cxx_std_17)
|
||||||
|
|
||||||
# being a cross-platform target, we enforce standards conformance on MSVC
|
# being a cross-platform target, we enforce standards conformance on MSVC
|
||||||
if(MSVC)
|
target_compile_options(Greeter PUBLIC "$<$<COMPILE_LANG_AND_ID:CXX,MSVC>:/permissive>")
|
||||||
target_compile_options(Greeter PUBLIC /permissive)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Link dependencies EITHER: target_link_libraries(Greeter PRIVATE
|
# Link dependencies EITHER: target_link_libraries(Greeter PRIVATE
|
||||||
# $<BUILD_INTERFACE:fmt::fmt-header-only>) # OR:
|
# $<BUILD_INTERFACE:fmt::fmt-header-only>) # OR:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue