From 8ddb9fc7ea3dc8fb5ee77f1c2e683e7e7e6e94b4 Mon Sep 17 00:00:00 2001 From: Steve-o Date: Fri, 12 Oct 2012 18:18:04 +0000 Subject: [PATCH] Enable parallel make and LTO by default. --- CMakeLists.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index e9f34ebf..751df1bf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,6 +56,16 @@ add_definitions( -D_CRT_SECURE_NO_WARNINGS ) +# Parallel make. +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP") + +# Optimization flags. +# http://msdn.microsoft.com/en-us/magazine/cc301698.aspx +set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /GL") +set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /LTCG") +set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /LTCG") +set(CMAKE_MODULE_LINKER_FLAGS_RELEASE "${CMAKE_MODULE_LINKER_FLAGS_RELEASE} /LTCG") + #----------------------------------------------------------------------------- # source files