Skip to content

Commit 8e45677

Browse files
committed
Optimize: Add high-performance MSVC flags (/O2, /Ot, /GL) for Windows Release builds
1 parent 8420036 commit 8e45677

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
1010

1111
if (MSVC)
1212
add_compile_options(/W4 /wd4244 /wd4245 /wd4267 /wd4100 /wd4200)
13+
add_compile_options($<$<CONFIG:Release>:/O2 /Ot /GL>)
1314
add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE)
1415
else()
1516
add_compile_options(-Wall -Wextra -Wno-sign-compare -Wno-unused-variable -Wno-unused-parameter)

0 commit comments

Comments
 (0)