File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- set_target_properties (${PROJECT_NAME }
1+ function (setup_compiler TARGET )
2+ set_target_properties (${TARGET}
23 PROPERTIES
34 EXPORT_COMPILE_COMMANDS ON
45 CXX_STANDARD_REQUIRED YES
56 CXX_EXTENSIONS NO
67 CXX_STANDARD 17
78)
89
9- target_compile_features (${PROJECT_NAME }
10+ target_compile_features (${TARGET }
1011 PRIVATE
1112 cxx_std_17
1213)
@@ -54,14 +55,15 @@ if(CMAKE_BUILD_TYPE STREQUAL "Debug")
5455 )
5556endif ()
5657
57- target_compile_options (${PROJECT_NAME }
58+ target_compile_options (${TARGET }
5859 PRIVATE
5960 $<$<CXX_COMPILER_ID :MSVC >:${MSVC_COMPILE_OPTIONS} >
6061 $<$<NOT :$<CXX_COMPILER_ID :MSVC >>:${NOT_MSVC_COMPILE_OPTIONS} >
6162)
6263
63- target_link_options (${PROJECT_NAME }
64+ target_link_options (${TARGET }
6465 PUBLIC
6566 $<$<CXX_COMPILER_ID :MSVC >:${MSVC_LINK_OPTIONS} >
6667 $<$<NOT :$<CXX_COMPILER_ID :MSVC >>:${NOT_MSVC_LINK_OPTIONS} >
6768)
69+ endfunction ()
You can’t perform that action at this time.
0 commit comments