mirror of
https://git.mirrors.martin98.com/https://github.com/google/draco
synced 2025-06-04 11:25:44 +08:00
Increase optimization level in release builds.
When users pass turn on ENABLE_EXTRA_SPEED at CMake generation, use -O3 in gcc like compilers, and /Ox in MSVC.
This commit is contained in:
parent
f4f5c81a56
commit
b83f22b16b
@ -103,10 +103,8 @@ endif ()
|
|||||||
|
|
||||||
if(ENABLE_EXTRA_SPEED)
|
if(ENABLE_EXTRA_SPEED)
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
#maximum optimization in Release mode
|
# Maximum optimization in Release mode.
|
||||||
add_compile_options("$<$<CONFIG:RELEASE>:/Ox>")
|
add_compile_options("$<$<CONFIG:RELEASE>:/Ox>")
|
||||||
#add_compile_options("$<$<CONFIG:MinSizeRel>:/Ox>") #uncomment if consistent compiler settings are more important then binary size
|
|
||||||
#add_compile_options("$<$<CONFIG:RelWithDebInfo>:/Ox>") #uncomment if consistent compiler settings are more important then binary size
|
|
||||||
else()
|
else()
|
||||||
add_compiler_flag_if_supported("-O3")
|
add_compiler_flag_if_supported("-O3")
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user