diff --git a/CMakeLists.txt b/CMakeLists.txt index ac2067e0d..a5309126a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -191,7 +191,7 @@ if(XSAN) endif() if(CMAKE_BUILD_TYPE MATCHES "[Dd][Ee][Bb][Uu][Gg]") - add_definitions(-DLOKINET_DEBUG=1) + add_definitions(-DLOKINET_DEBUG) endif() @@ -224,7 +224,7 @@ set(THREADS_PREFER_PTHREAD_FLAG TRUE) find_package(Threads REQUIRED) if(TESTNET) - add_definitions(-DTESTNET=1) + add_definitions(-DTESTNET) # 5 times slower than realtime # add_definitions(-DTESTNET_SPEED=5) endif() @@ -288,7 +288,7 @@ if(ANDROID) endif() if(WITH_HIVE) - add_definitions(-DLOKINET_HIVE=1) + add_definitions(-DLOKINET_HIVE) endif() add_subdirectory(crypto) diff --git a/cmake/shadow.cmake b/cmake/shadow.cmake index deed362b1..6eac1a28e 100644 --- a/cmake/shadow.cmake +++ b/cmake/shadow.cmake @@ -9,10 +9,13 @@ else() message(FATAL_ERROR "SHADOW_ROOT path does not exist: '${SHADOW_ROOT}'") endif(EXISTS "${SHADOW_ROOT}") +if(NOT TESTNET) + message(FATAL_ERROR "shadow testing framework requires a testnet build") +endif() + set(CMAKE_MODULE_PATH "${SHADOW_ROOT}/share/cmake/Modules") include_directories(${CMAKE_MODULE_PATH}) include(ShadowTools) add_compile_options(-fno-inline -fno-strict-aliasing ) -add_definitions(-DTESTNET=1) add_definitions(-DLOKINET_SHADOW) include_directories(${SHADOW_ROOT}/include)