Skip to content

Commit

Permalink
Merge pull request #301 from eddiz/master
Browse files Browse the repository at this point in the history
Optional Compiler Optimization
  • Loading branch information
tomfinegan authored Nov 29, 2017
2 parents ff89a11 + b83f22b commit 451b56f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,15 @@ if (ENABLE_GOMA)
set_compiler_launcher(ENABLE_GOMA gomacc)
endif ()

if(ENABLE_EXTRA_SPEED)
if(MSVC)
# Maximum optimization in Release mode.
add_compile_options("$<$<CONFIG:RELEASE>:/Ox>")
else()
add_compiler_flag_if_supported("-O3")
endif()
endif()

# Generate a version file containing repository info.
include(FindGit)
find_package(Git)
Expand Down

0 comments on commit 451b56f

Please sign in to comment.