Skip to content

Commit 619807e

Browse files
committed
Fix: Correct MSVC generator expression syntax and add /LTCG
1 parent 8e45677 commit 619807e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ 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>)
13+
add_compile_options($<$<CONFIG:Release>:/O2;/Ot;/GL>)
1414
add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE)
15+
add_link_options($<$<CONFIG:Release>:/LTCG>)
1516
else()
1617
add_compile_options(-Wall -Wextra -Wno-sign-compare -Wno-unused-variable -Wno-unused-parameter)
1718
endif()

0 commit comments

Comments
 (0)