diff --git a/CMakeLists.txt b/CMakeLists.txt index 765d48286..1da709afa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -107,13 +107,6 @@ else() set(CMAKE_CXX_FLAGS_DEBUG "-g") endif() -# ndebug -option(NDEBUG "No debug" OFF) -message(STATUS "NDEBUG: ${NDEBUG} (be careful CMAKE_BUILD_TYPE can also \ -append this flag)") -if(NDEBUG) - add_definitions( -DNDEBUG ) -endif() # ----------------------------------------------------------------------------- # default build type is debug @@ -127,11 +120,6 @@ message(STATUS "CMake build type: ${CMAKE_BUILD_TYPE}") # threading find_package(Threads REQUIRED) - -# optional Ltalloc -option(USE_LTALLOC "Use Ltalloc instead of default allocator (default OFF). \ -Set this to ON to link with Ltalloc." OFF) - # optional readline option(USE_READLINE "Use GNU Readline library if available (default ON). \ Set this to OFF to prevent linking with Readline even if it is available." ON) @@ -142,9 +130,6 @@ if (USE_READLINE) endif() endif() -# OpenSSL -find_package(OpenSSL REQUIRED) - set(libs_dir ${CMAKE_SOURCE_DIR}/libs) add_subdirectory(libs EXCLUDE_FROM_ALL) @@ -152,11 +137,9 @@ add_subdirectory(libs EXCLUDE_FROM_ALL) option(TEST_COVERAGE "Generate coverage reports from running memgraph" OFF) option(TOOLS "Build tools binaries" ON) option(QUERY_MODULES "Build query modules containing custom procedures" ON) -option(MG_COMMUNITY "Build Memgraph Community Edition" OFF) option(ASAN "Build with Address Sanitizer. To get a reasonable performance option should be used only in Release or RelWithDebInfo build " OFF) option(TSAN "Build with Thread Sanitizer. To get a reasonable performance option should be used only in Release or RelWithDebInfo build " OFF) option(UBSAN "Build with Undefined Behaviour Sanitizer" OFF) -option(THIN_LTO "Build with link time optimization" OFF) if (TEST_COVERAGE) string(TOLOWER ${CMAKE_BUILD_TYPE} lower_build_type) @@ -167,10 +150,6 @@ if (TEST_COVERAGE) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fprofile-instr-generate -fcoverage-mapping") endif() -if (MG_COMMUNITY) - add_definitions(-DMG_COMMUNITY) -endif() - if (ASAN) # Enable Addres sanitizer and get nicer stack traces in error messages. # NOTE: AddressSanitizer uses llvm-symbolizer binary from the Clang @@ -222,11 +201,6 @@ if (UBSAN) # Make sure llvm-symbolizer binary is in path endif() -if (THIN_LTO) - set(CMAKE_CXX_FLAGS"${CMAKE_CXX_FLAGS} -flto=thin") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -flto=thin") -endif() - # Add subprojects include_directories(src) add_subdirectory(src) diff --git a/libs/CMakeLists.txt b/libs/CMakeLists.txt index 6d78924cd..b947dd0c9 100644 --- a/libs/CMakeLists.txt +++ b/libs/CMakeLists.txt @@ -107,12 +107,6 @@ import_external_library(fmt STATIC # Skip testing. CMAKE_ARGS -DFMT_TEST=OFF) - -# Setup ltalloc library -add_library(ltalloc STATIC ltalloc/ltalloc.cc) -# TODO(mferencevic): Enable this when clang on apollo is updated -#target_compile_options(ltalloc PUBLIC -flto) - # setup rapidcheck (it cannot be external, since it doesn't have install # target) set(RC_ENABLE_GTEST ON CACHE BOOL "Build Google Test integration" FORCE) diff --git a/libs/setup.sh b/libs/setup.sh index 5d9163b9e..54431ee7c 100755 --- a/libs/setup.sh +++ b/libs/setup.sh @@ -116,11 +116,6 @@ cd json wget -nv http://deps.memgraph.io/json.hpp cd .. -# ltalloc -# git clone https://github.com/r-lyeh/ltalloc.git -ltalloc_tag="43b51c14857111f993f277c46151fdfac91525a2" # Nov 16, 2017 -clone git://deps.memgraph.io/ltalloc.git ltalloc $ltalloc_tag - bzip2_tag="0405487e2b1de738e7f1c8afb50d19cf44e8d580" # v1.0.6 (May 26, 2011) clone git://deps.memgraph.io/bzip2.git bzip2 $bzip2_tag diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 70714dbff..f0a70c008 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -97,12 +97,6 @@ add_subdirectory(audit) # mg-utils mg-io mg-requests mg-communication mg-rpc # mg-auth mg-audit) # -#if (USE_LTALLOC) -# list(APPEND MG_SINGLE_NODE_HA_LIBS ltalloc) -# # TODO(mferencevic): Enable this when clang is updated on apollo. -# # set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -flto") -#endif() -# #add_library(mg-single-node-ha STATIC ${mg_single_node_ha_sources}) #target_include_directories(mg-single-node-ha PUBLIC ${CMAKE_SOURCE_DIR}/include) #target_link_libraries(mg-single-node-ha ${MG_SINGLE_NODE_HA_LIBS}) @@ -145,12 +139,6 @@ set(MG_SINGLE_NODE_V2_LIBS stdc++fs Threads::Threads # These are enterprise subsystems set(MG_SINGLE_NODE_V2_LIBS ${MG_SINGLE_NODE_V2_LIBS} mg-auth mg-audit) -if (USE_LTALLOC) - list(APPEND MG_SINGLE_NODE_V2_LIBS ltalloc) - # TODO(mferencevic): Enable this when clang is updated on apollo. - # set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -flto") -endif() - # memgraph main executable add_executable(memgraph ${mg_single_node_v2_sources}) target_include_directories(memgraph PUBLIC ${CMAKE_SOURCE_DIR}/include) diff --git a/src/communication/CMakeLists.txt b/src/communication/CMakeLists.txt index b537cf6db..c952a3030 100644 --- a/src/communication/CMakeLists.txt +++ b/src/communication/CMakeLists.txt @@ -8,5 +8,7 @@ set(communication_src_files add_library(mg-communication STATIC ${communication_src_files}) target_link_libraries(mg-communication Threads::Threads mg-utils mg-io fmt glog gflags) + +find_package(OpenSSL REQUIRED) target_link_libraries(mg-communication ${OPENSSL_LIBRARIES}) target_include_directories(mg-communication SYSTEM PUBLIC ${OPENSSL_INCLUDE_DIR})