diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 26a3211d4..5b382264b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -234,10 +234,6 @@ elseif (DATABASE STREQUAL "berkeleydb") message(STATUS "Using Berkeley DB as default DB type") add_definitions("-DDEFAULT_DB_TYPE=\"berkeley\"") -elseif (DATABASE STREQUAL "memory") - set(BLOCKCHAIN_DB DB_MEMORY) - message(STATUS "Using Serialised In Memory as default DB type") - add_definitions("-DDEFAULT_DB_TYPE=\"memory\"") else() die("Invalid database type: ${DATABASE}") endif() @@ -388,9 +384,9 @@ else() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DGTEST_HAS_TR1_TUPLE=0") endif() if(CMAKE_C_COMPILER_ID STREQUAL "GNU" AND NOT (CMAKE_C_COMPILER_VERSION VERSION_LESS 4.8)) - set(DEBUG_FLAGS "-g3 -Og") + set(DEBUG_FLAGS "-g3 -Og -fprofile-arcs -ftest-coverage --coverage") else() - set(DEBUG_FLAGS "-g3 -O0") + set(DEBUG_FLAGS "-g3 -O0 -fprofile-arcs -ftest-coverage --coverage") endif() if(NOT DEFINED USE_LTO_DEFAULT) @@ -426,8 +422,18 @@ else() set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${RELEASE_FLAGS}") set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${RELEASE_FLAGS}") - if(STATIC AND NOT APPLE AND NOT FREEBSD AND NOT OPENBSD) - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc -static-libstdc++") + if(STATIC) + # STATIC already configures most deps to be linked in statically, + # here we make more deps static if the platform permits it + if (MINGW) + # On Windows, this is as close to fully-static as we get: + # this leaves only deps on /c/Windows/system32/*.dll + set(STATIC_FLAGS "-static") + elseif (NOT (APPLE OR FREEBSD OR OPENBSD)) + # On Linux, we don't support fully static build, but these can be static + set(STATIC_FLAGS "-static-libgcc -static-libstdc++") + endif() + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${STATIC_FLAGS} ") endif() endif() |