File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -390,11 +390,13 @@ if(MSVC)
390390
391391 set (DILIGENT_MSVC_DEBUG_COMPILE_OPTIONS "" CACHE STRING "Additional MSVC compile options for debug configuration" )
392392
393+ # Enable whole program optimization
394+ set (DEFAULT_DILIGENT_MSVC_RELEASE_COMPILE_OPTIONS /GL)
393395 if ("${TARGET_CPU} " STREQUAL "x86_64" )
394396 # Enable AVX2
395- set (DILIGENT_MSVC_RELEASE_COMPILE_OPTIONS " /arch:AVX2" )
397+ set (DEFAULT_DILIGENT_MSVC_RELEASE_COMPILE_OPTIONS ${DEFAULT_DILIGENT_MSVC_RELEASE_COMPILE_OPTIONS} /arch:AVX2)
396398 endif ()
397- set (DILIGENT_MSVC_RELEASE_COMPILE_OPTIONS ${DILIGENT_MSVC_RELEASE_COMPILE_OPTIONS } CACHE STRING "Additional MSVC compile options for release configurations" )
399+ set (DILIGENT_MSVC_RELEASE_COMPILE_OPTIONS ${DEFAULT_DILIGENT_MSVC_RELEASE_COMPILE_OPTIONS } CACHE STRING "Additional MSVC compile options for release configurations" )
398400
399401 # Enable level 4 warnings, but disable
400402 # - w4100 - unreferenced formal parameter
@@ -412,9 +414,8 @@ if(MSVC)
412414 # In all release modes also:
413415 # - disable w4189 - local variable is initialized but not referenced
414416 # - Disable RTTI (/GR-)
415- # - Enable whole program optimization (/GL)
416417 # - Enable string pooling (/GF)
417- set (MSVC_ALL_RELEASE_COMPILE_OPTIONS /wd4189 /GR- /GL / GF)
418+ set (MSVC_ALL_RELEASE_COMPILE_OPTIONS /wd4189 /GR- /GF)
418419 #target_compile_options(Diligent-BuildSettings INTERFACE "$<$<CONFIG:RELEASE>:/wd4189 /Ot")
419420 # In RELEASE mode:
420421 # - Set favor fast code option (/Ot)
You can’t perform that action at this time.
0 commit comments