Cmake cleanup: remove unneeded =1 from definitions

We only check for definedness, not truth, in the code so make the cmake
definitions agree with that.

This also avoids warnings when building on macos (because swift only
allowed defined/undefined but not values)
This commit is contained in:
Jason Rhinelander 2022-06-21 18:57:36 -03:00
parent 4a4f16e5c8
commit 0edb4435d4
No known key found for this signature in database
GPG Key ID: C4992CE7A88D4262
2 changed files with 7 additions and 4 deletions

View File

@ -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)

View File

@ -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)