summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-01-15 13:54:06 +0100
committermadmaxoft <github@xoft.cz>2014-01-15 13:54:06 +0100
commitd67cd8dafc9d87fc5f26fd40c965e4234ac0f3b1 (patch)
treee43f307377ee1480a0723633e06b517dda859588 /CMakeLists.txt
parentCMake: Removed SCL warnings from Lua and ZLib. (diff)
downloadcuberite-d67cd8dafc9d87fc5f26fd40c965e4234ac0f3b1.tar
cuberite-d67cd8dafc9d87fc5f26fd40c965e4234ac0f3b1.tar.gz
cuberite-d67cd8dafc9d87fc5f26fd40c965e4234ac0f3b1.tar.bz2
cuberite-d67cd8dafc9d87fc5f26fd40c965e4234ac0f3b1.tar.lz
cuberite-d67cd8dafc9d87fc5f26fd40c965e4234ac0f3b1.tar.xz
cuberite-d67cd8dafc9d87fc5f26fd40c965e4234ac0f3b1.tar.zst
cuberite-d67cd8dafc9d87fc5f26fd40c965e4234ac0f3b1.zip
Diffstat (limited to '')
-rw-r--r--CMakeLists.txt10
1 files changed, 8 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6e88a8337..f2ad8b364 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -36,6 +36,13 @@ endif()
if(MSVC)
# Make build use multiple threads under MSVC:
add_flags_cxx("/MP")
+
+ # Make release builds use link-time code generation:
+ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /GL")
+ set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_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")
elseif(APPLE)
#on os x clang adds pthread for us but we need to add it for gcc
if (NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
@@ -172,7 +179,6 @@ MARK_AS_ADVANCED(
set(CMAKE_CONFIGURATION_TYPES "Debug;Release;DebugProfile;ReleaseProfile" CACHE STRING "" FORCE)
project (MCServer)
-
# Include all the libraries:
add_subdirectory(lib/inifile/)
add_subdirectory(lib/jsoncpp/)
@@ -196,5 +202,5 @@ if (NOT MSVC)
string(REPLACE "-w" "" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}")
endif()
-add_subdirectory (src)
+add_subdirectory (src)