aboutsummaryrefslogtreecommitdiffhomepage
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGravatar Yuri Kunde Schlesner <yuriks@yuriks.net>2015-07-28 14:32:29 -0300
committerGravatar Yuri Kunde Schlesner <yuriks@yuriks.net>2015-07-28 14:32:29 -0300
commit12f78c2ba6567ccef8e913f7e154015d54e8a7ed (patch)
tree7d2a246b31f5a8170a841120bcda30b073db9df0 /CMakeLists.txt
parent62caa89f480591260a95d165ccc62ec6c8dd9044 (diff)
Enable linker optimizations in MSVC Release builds
Apparently /DEBUG implicitly disables linker optimizations. This explicitly re-enables them, giving a 40% reduction in binary sizes and a very slight runtime speed improvement.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e945a667..a02b85da 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -48,7 +48,7 @@ else()
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}" CACHE STRING "" FORCE)
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "/DEBUG" CACHE STRING "" FORCE)
- set(CMAKE_EXE_LINKER_FLAGS_RELEASE "/DEBUG" CACHE STRING "" FORCE)
+ set(CMAKE_EXE_LINKER_FLAGS_RELEASE "/DEBUG /INCREMENTAL:NO /OPT:REF,ICF" CACHE STRING "" FORCE)
endif()
add_definitions(-DSINGLETHREADED)