mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-26 10:31:34 +08:00
Merge pull request #831 from taketwo/fix-830
Change the default value for SPDLOG_BUILD_xxx
This commit is contained in:
commit
188cff7d65
@ -45,11 +45,17 @@ include(cmake/sanitizers.cmake)
|
|||||||
add_library(spdlog INTERFACE)
|
add_library(spdlog INTERFACE)
|
||||||
add_library(spdlog::spdlog ALIAS spdlog)
|
add_library(spdlog::spdlog ALIAS spdlog)
|
||||||
|
|
||||||
option(SPDLOG_BUILD_EXAMPLES "Build examples" ON)
|
# Check if spdlog is being used directly or via add_subdirectory
|
||||||
option(SPDLOG_BUILD_BENCH "Build benchmarks" ON)
|
set(SPDLOG_MASTER_PROJECT OFF)
|
||||||
|
if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
|
||||||
|
set(SPDLOG_MASTER_PROJECT ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
option(SPDLOG_BUILD_EXAMPLES "Build examples" ${SPDLOG_MASTER_PROJECT})
|
||||||
|
option(SPDLOG_BUILD_BENCH "Build benchmarks" ${SPDLOG_MASTER_PROJECT})
|
||||||
|
|
||||||
cmake_dependent_option(SPDLOG_BUILD_TESTING
|
cmake_dependent_option(SPDLOG_BUILD_TESTING
|
||||||
"Build spdlog tests" ON
|
"Build spdlog tests" ${SPDLOG_MASTER_PROJECT}
|
||||||
"BUILD_TESTING" OFF
|
"BUILD_TESTING" OFF
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user