Skip to content

Commit 4e5071e

Browse files
author
Rye
committed
Increase MSVC to Ob3 for inlining comparable to clang and gcc
1 parent 6feed6e commit 4e5071e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

indra/cmake/00-Common.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,10 @@ if (WINDOWS)
9797
/permissive-
9898
)
9999

100-
# Nicky: x64 implies SSE2
101-
if( ADDRESS_SIZE EQUAL 32 )
102-
add_compile_options( /arch:SSE2 )
103-
endif()
100+
# We want aggressive inlining on MSVC to better match clang/gcc at O3
101+
string(REPLACE "/Ob2" "/Ob3" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
102+
string(REPLACE "/Ob2" "/Ob3" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
103+
string(REPLACE "/Ob2" "/Ob3" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
104104

105105
# Are we using the crummy Visual Studio KDU build workaround?
106106
if (NOT VS_DISABLE_FATAL_WARNINGS)

0 commit comments

Comments
 (0)