diff options
author | madmaxoft <github@xoft.cz> | 2014-01-15 13:54:06 +0100 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2014-01-15 13:54:06 +0100 |
commit | d67cd8dafc9d87fc5f26fd40c965e4234ac0f3b1 (patch) | |
tree | e43f307377ee1480a0723633e06b517dda859588 /CMakeLists.txt | |
parent | CMake: Removed SCL warnings from Lua and ZLib. (diff) | |
download | cuberite-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 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 10 |
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) |