diff --git a/CMakeLists.txt b/CMakeLists.txt index 4e7e699..d25623c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -101,6 +101,17 @@ if (ENABLE_GOMA) set_compiler_launcher(ENABLE_GOMA gomacc) endif () +if(ENABLE_EXTRA_SPEED) + if(MSVC) + #enable parallel builds + add_compile_options("$<$:/Qpar>") + #maximum optimization in Release mode + add_compile_options("$<$,$>:/Ox>") + else() + add_compiler_flag_if_supported("-O3") + endif() +endif() + # Generate a version file containing repository info. include(FindGit) find_package(Git)