summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTycho Bickerstaff <work.tycho@gmail.com>2013-12-21 14:45:27 +0100
committerTycho Bickerstaff <work.tycho@gmail.com>2013-12-21 14:45:27 +0100
commit869104de343f40b760ae9351d67d72ffa8d7e377 (patch)
tree4fb8728642c2b3a34eb1388f7f69afca5df457dd
parentMerge branch 'cmake' of github.com:worktycho/MCServer into cmake (diff)
downloadcuberite-869104de343f40b760ae9351d67d72ffa8d7e377.tar
cuberite-869104de343f40b760ae9351d67d72ffa8d7e377.tar.gz
cuberite-869104de343f40b760ae9351d67d72ffa8d7e377.tar.bz2
cuberite-869104de343f40b760ae9351d67d72ffa8d7e377.tar.lz
cuberite-869104de343f40b760ae9351d67d72ffa8d7e377.tar.xz
cuberite-869104de343f40b760ae9351d67d72ffa8d7e377.tar.zst
cuberite-869104de343f40b760ae9351d67d72ffa8d7e377.zip
-rw-r--r--CMakeLists.txt21
1 files changed, 19 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7dff04f8a..707652bef 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,11 +14,11 @@ macro(add_flags FLAGS)
endmacro()
SET(CMAKE_CXX_FLAGS_PROFILE
- "${CMAKE_CXX_FLAGS_DEBUG} -pg"
+ "${CMAKE_CXX_FLAGS_DEBUG} -pg -DNDEBUG"
CACHE STRING "Flags used by the C++ compiler during profile builds."
FORCE )
SET(CMAKE_C_FLAGS_PROFILE
- "${CMAKE_C_FLAGS_DEBUG} -pg"
+ "${CMAKE_C_FLAGS_DEBUG} -pg -DNDEBUG"
CACHE STRING "Flags used by the C compiler during profile builds."
FORCE )
SET(CMAKE_EXE_LINKER_FLAGS_PROFILE
@@ -35,10 +35,21 @@ MARK_AS_ADVANCED(
CMAKE_EXE_LINKER_FLAGS_PROFILE
CMAKE_SHARED_LINKER_FLAGS_PROFILE )
+if(UNIX)
+set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DNDEBUG")
+set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DNDEBUG")
+set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -D_DEBUG")
+set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -D_DEBUG")
+endif()
+
if(WIN32)
add_flags("/MP")
+else()
+ add_flags("-pthread")
endif()
+
+
set(CMAKE_CXX_FLAGS_RELEASE_BAK "${CMAKE_CXX_FLAGS_RELEASE}")
set(CMAKE_C_FLAGS_RELEASE_BAK "${CMAKE_C_FLAGS_RELEASE}")
if (UNIX)
@@ -54,6 +65,12 @@ endif()
set(CMAKE_BUILD_TYPE_BAK ${CMAKE_BUILD_TYPE})
set(CMAKE_BUILD_TYPE "Release")
+if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+ add_definitions(-DCRYPTOPP_DISABLE_ASM)
+endif()
+
+add_definitions(-DLUA_USE_DLOPEN)
+
add_subdirectory(lib/inifile/)
add_subdirectory(lib/jsoncpp/)
add_subdirectory(lib/cryptopp/)