From a27dfa8b708b36a187d4b6703ff8d43e3bc2bceb Mon Sep 17 00:00:00 2001 From: XMRig Date: Mon, 3 Sep 2018 01:26:19 +0300 Subject: [PATCH] Add WITH_DEBUG_LOG CMake option. --- CMakeLists.txt | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 07397ac4..62ec419e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,11 +1,12 @@ cmake_minimum_required(VERSION 2.8) project(xmrig) -option(WITH_LIBCPUID "Use Libcpuid" ON) -option(WITH_AEON "CryptoNight-Lite support" ON) -option(WITH_SUMO "CryptoNight-Heavy support" ON) -option(WITH_HTTPD "HTTP REST API" ON) -option(BUILD_STATIC "Build static binary" OFF) +option(WITH_LIBCPUID "Use Libcpuid" ON) +option(WITH_AEON "CryptoNight-Lite support" ON) +option(WITH_SUMO "CryptoNight-Heavy support" ON) +option(WITH_HTTPD "HTTP REST API" ON) +option(WITH_DEBUG_LOG "Enable debug log output" OFF) +option(BUILD_STATIC "Build static binary" OFF) include (CheckIncludeFile) include (cmake/cpu.cmake) @@ -170,7 +171,6 @@ endif() add_definitions(/D__STDC_FORMAT_MACROS) add_definitions(/DUNICODE) -#add_definitions(/DAPP_DEBUG) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake") @@ -246,5 +246,9 @@ if (BUILD_STATIC) set(CMAKE_EXE_LINKER_FLAGS " -static") 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}) target_link_libraries(${PROJECT_NAME} ${UV_LIBRARIES} ${MHD_LIBRARY} ${EXTRA_LIBS} ${CPUID_LIB})