Skip to content

Commit

Permalink
Increase MSVC to Ob3 for inlining comparable to clang and gcc
Browse files Browse the repository at this point in the history
  • Loading branch information
RyeMutt committed Nov 21, 2024
1 parent d3bf66c commit 65a99a7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions indra/cmake/00-Common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ if (WINDOWS)
/permissive-
)

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

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

0 comments on commit 65a99a7

Please sign in to comment.