mirror of
https://git.mirrors.martin98.com/https://github.com/google/draco
synced 2025-09-13 06:13:14 +08:00
Optional Compiler Optimization
Enable all Compile Optimization by setting according compiler flags. (Visual Studio tested, gcc and other should work properly, but untested)
This commit is contained in:
parent
441d5e05f7
commit
890ecc27cb
@ -101,6 +101,17 @@ if (ENABLE_GOMA)
|
|||||||
set_compiler_launcher(ENABLE_GOMA gomacc)
|
set_compiler_launcher(ENABLE_GOMA gomacc)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
if(ENABLE_EXTRA_SPEED)
|
||||||
|
if(MSVC)
|
||||||
|
#enable parallel builds
|
||||||
|
add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/Qpar>")
|
||||||
|
#maximum optimization in Release mode
|
||||||
|
add_compile_options("$<$<AND:$<CXX_COMPILER_ID:MSVC>,$<CONFIG:RELEASE>>:/Ox>")
|
||||||
|
else()
|
||||||
|
add_compiler_flag_if_supported("-O3")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
# Generate a version file containing repository info.
|
# Generate a version file containing repository info.
|
||||||
include(FindGit)
|
include(FindGit)
|
||||||
find_package(Git)
|
find_package(Git)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user