File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,9 +10,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
1010
1111if (MSVC )
1212 add_compile_options (/W4 /wd4244 /wd4245 /wd4267 /wd4100 /wd4200 )
13- add_compile_options ($<$<CONFIG :Release >:/O2 ;/Ot ;/GL >)
1413 add_definitions (-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE )
15- add_link_options ($<$<CONFIG :Release >:/LTCG >)
1614else ()
1715 add_compile_options (-Wall -Wextra -Wno-sign-compare -Wno-unused-variable -Wno-unused-parameter )
1816endif ()
@@ -220,6 +218,10 @@ if(NOT MSVC)
220218 if (NOT APPLE )
221219 target_link_options (prox_core PUBLIC $<$<CONFIG :Release >:-flto >)
222220 endif ()
221+ else ()
222+ # Aggressive optimizations for MSVC in Release mode
223+ target_compile_options (prox_core PRIVATE $<$<CONFIG :Release >:/O2 /Ot /GL >)
224+ target_link_options (prox_core PUBLIC $<$<CONFIG :Release >:/LTCG >)
223225endif ()
224226
225227# Main executable
You can’t perform that action at this time.
0 commit comments