Added log level only on compile flag

Signed-off-by: Alejandro Saucedo <axsauze@gmail.com>
This commit is contained in:
Alejandro Saucedo 2022-04-13 11:05:10 +01:00
parent 11b04510ea
commit 5e23eb7fdb
2 changed files with 0 additions and 8 deletions

View file

@ -18,7 +18,6 @@ option(KOMPUTE_OPT_INSTALL "Enable if you want to enable installation" 0)
# Build options
option(KOMPUTE_OPT_BUILD_PYTHON "Enable if you want to build python bindings" 0)
option(KOMPUTE_OPT_ENABLE_SPDLOG "Enable to compile with spdlog as the internal logging framework" 0)
option(KOMPUTE_OPT_LOG_LEVEL "Provides configuration option for log level 0-7 (debug, info, warn, etc)" -1)
option(KOMPUTE_OPT_REPO_SUBMODULE_BUILD "Use the submodule repos instead of external package manager" 0)
option(KOMPUTE_OPT_ANDROID_BUILD "Enable android compilation flags required" 0)
option(KOMPUTE_OPT_DISABLE_VK_DEBUG_LAYERS "Explicitly disable debug layers even on debug" 0)
@ -27,11 +26,6 @@ option(KOMPUTE_OPT_BUILD_AS_SHARED_LIB "Whether to build kompute as shared libra
# Build flags
set(KOMPUTE_EXTRA_CXX_FLAGS "" CACHE STRING "Extra compile flags for Kompute, see docs for full list")
# If kompute log level greater or equal to 0 then set flag
if(NOT (KOMPUTE_OPT_LOG_LEVEL LESS 0))
set(KOMPUTE_EXTRA_CXX_FLAGS "${KOMPUTE_EXTRA_CXX_FLAGS} -DKOMPUTE_LOG_LEVEL=${KOMPUTE_OPT_LOG_LEVEL}")
endif()
if(KOMPUTE_OPT_ENABLE_SPDLOG)
set(KOMPUTE_EXTRA_CXX_FLAGS "${KOMPUTE_EXTRA_CXX_FLAGS} -DKOMPUTE_ENABLE_SPDLOG=1")
set(SPDLOG_FMT_EXTERNAL ON CACHE BOOL "Enables external fmt as its current dep" FORCE)

View file

@ -37,8 +37,6 @@ This by default configures without any of the extra build tasks (such as buildin
- Enable to build python bindings (used internally for python package)
* - -DKOMPUTE_OPT_ENABLE_SPDLOG=1
- Enable to compile with spdlog as the internal logging framework
* - -DKOMPUTE_OPT_LOG_LEVEL=1
- Provides configuration option for log level 0-7 (debug, info, warn, etc)
* - -DKOMPUTE_OPT_REPO_SUBMODULE_BUILD=1
- Use the submodule repos instead of external packages / manager
* - -DKOMPUTE_OPT_ANDROID_BUILD=1