Add WITH_DEBUG_LOG CMake option.
This commit is contained in:
@ -5,6 +5,7 @@ option(WITH_LIBCPUID "Use Libcpuid" ON)
|
|||||||
option(WITH_AEON "CryptoNight-Lite support" ON)
|
option(WITH_AEON "CryptoNight-Lite support" ON)
|
||||||
option(WITH_SUMO "CryptoNight-Heavy support" ON)
|
option(WITH_SUMO "CryptoNight-Heavy support" ON)
|
||||||
option(WITH_HTTPD "HTTP REST API" ON)
|
option(WITH_HTTPD "HTTP REST API" ON)
|
||||||
|
option(WITH_DEBUG_LOG "Enable debug log output" OFF)
|
||||||
option(BUILD_STATIC "Build static binary" OFF)
|
option(BUILD_STATIC "Build static binary" OFF)
|
||||||
|
|
||||||
include (CheckIncludeFile)
|
include (CheckIncludeFile)
|
||||||
@ -170,7 +171,6 @@ endif()
|
|||||||
|
|
||||||
add_definitions(/D__STDC_FORMAT_MACROS)
|
add_definitions(/D__STDC_FORMAT_MACROS)
|
||||||
add_definitions(/DUNICODE)
|
add_definitions(/DUNICODE)
|
||||||
#add_definitions(/DAPP_DEBUG)
|
|
||||||
|
|
||||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
|
||||||
|
|
||||||
@ -246,5 +246,9 @@ if (BUILD_STATIC)
|
|||||||
set(CMAKE_EXE_LINKER_FLAGS " -static")
|
set(CMAKE_EXE_LINKER_FLAGS " -static")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (WITH_DEBUG_LOG)
|
||||||
|
add_definitions(/DAPP_DEBUG)
|
||||||
|
endif()
|
||||||
|
|
||||||
add_executable(${PROJECT_NAME} ${HEADERS} ${SOURCES} ${SOURCES_OS} ${SOURCES_CPUID} ${HEADERS_CRYPTO} ${SOURCES_CRYPTO} ${SOURCES_SYSLOG} ${HTTPD_SOURCES})
|
add_executable(${PROJECT_NAME} ${HEADERS} ${SOURCES} ${SOURCES_OS} ${SOURCES_CPUID} ${HEADERS_CRYPTO} ${SOURCES_CRYPTO} ${SOURCES_SYSLOG} ${HTTPD_SOURCES})
|
||||||
target_link_libraries(${PROJECT_NAME} ${UV_LIBRARIES} ${MHD_LIBRARY} ${EXTRA_LIBS} ${CPUID_LIB})
|
target_link_libraries(${PROJECT_NAME} ${UV_LIBRARIES} ${MHD_LIBRARY} ${EXTRA_LIBS} ${CPUID_LIB})
|
||||||
|
Reference in New Issue
Block a user