Skip to content

Commit

Permalink
#718: remove all pressio-log configuration from pressio
Browse files Browse the repository at this point in the history
  • Loading branch information
cwschilly committed Feb 19, 2025
1 parent 0f6a5ff commit 6c22a26
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,6 @@ endif()

# logging
#=====================================================================
# pressio-log options must be configured here and stored in the cache
set(PRESSIO_ENABLE_COLORIZED_OUTPUT ON CACHE BOOL "Enable or disable colorized logging." )
set(PRESSIO_SILENCE_WARNINGS OFF CACHE BOOL "Enable or disable warnings" )
set(PRESSIO_ENABLE_EXTERNAL_FMT OFF CACHE BOOL "Allow using an externally provided fmt library")
set(fmt_INCLUDE_DIR "" CACHE STRING "Include directory of fmt library." )
set(fmt_ROOT "" CACHE STRING "Root directory of fmt library." )
set(fmt_DIR "" CACHE STRING "Root directory of fmt library." )

option(PRESSIO_ENABLE_LOGGING "Enable logging via pressio-log" ON)
if (PRESSIO_ENABLE_LOGGING)
add_compile_definitions(PRESSIO_ENABLE_LOGGING=1)
Expand All @@ -42,13 +34,11 @@ endif()
# get pressio-log (either find it or fetch it)
message(STATUS "PRESSIO_ENABLE_LOGGING = ${PRESSIO_ENABLE_LOGGING}")
if (PRESSIO_ENABLE_LOGGING)
if(PRESSIO_LOG_DIR)
message("${Green}-- Using ${PRESSIO_LOG_DIR}")
add_subdirectory(${PRESSIO_LOG_DIR} ${CMAKE_BINARY_DIR}/pressio-log)
set(PRESSIO_LOG_INCLUDE_DIR ${PRESSIO_LOG_DIR}/include)
if(PRESSIO_LOG_INCLUDE_DIR)
message("${Green}-- Using ${PRESSIO_LOG_INCLUDE_DIR}")
else()
include(FetchContent)
message("${Green}-- PRESSIO_LOG_DIR is not defined, so fetching pressio-log...")
message("${Green}-- PRESSIO_LOG_INCLUDE_DIR is not defined, so fetching pressio-log...")
FetchContent_Declare(
pressio-log
GIT_REPOSITORY https://github.com/Pressio/pressio-log.git
Expand Down Expand Up @@ -108,8 +98,6 @@ install(
if(PRESSIO_ENABLE_TESTS)
add_library(pressio INTERFACE)

target_link_libraries(pressio INTERFACE pressio-log)

target_include_directories(
pressio INTERFACE
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include;${PRESSIO_OPS_INCLUDE_DIR}>"
Expand Down

0 comments on commit 6c22a26

Please sign in to comment.