mirror of
https://github.com/gabime/spdlog.git
synced 2025-04-29 20:13:52 +00:00
Added cmake option SPDLOG_BUILD_ALL
This commit is contained in:
parent
d0fc8a572c
commit
854abdf5e6
@ -59,6 +59,8 @@ if (NOT DEFINED SPDLOG_MASTER_PROJECT)
|
|||||||
endif()
|
endif()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
option(SPDLOG_BUILD_ALL "Build all artifacts" OFF)
|
||||||
|
|
||||||
# build shared option
|
# build shared option
|
||||||
option(SPDLOG_BUILD_SHARED "Build shared library" OFF)
|
option(SPDLOG_BUILD_SHARED "Build shared library" OFF)
|
||||||
|
|
||||||
@ -255,7 +257,7 @@ endif()
|
|||||||
#---------------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------------
|
||||||
# Build binaries
|
# Build binaries
|
||||||
#---------------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------------
|
||||||
if(SPDLOG_BUILD_EXAMPLE OR SPDLOG_BUILD_EXAMPLE_HO)
|
if(SPDLOG_BUILD_EXAMPLE OR SPDLOG_BUILD_EXAMPLE_HO OR SPDLOG_BUILD_ALL)
|
||||||
message(STATUS "Generating example(s)")
|
message(STATUS "Generating example(s)")
|
||||||
add_subdirectory(example)
|
add_subdirectory(example)
|
||||||
spdlog_enable_warnings(example)
|
spdlog_enable_warnings(example)
|
||||||
@ -264,13 +266,13 @@ if(SPDLOG_BUILD_EXAMPLE OR SPDLOG_BUILD_EXAMPLE_HO)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(SPDLOG_BUILD_TESTS OR SPDLOG_BUILD_TESTS_HO)
|
if(SPDLOG_BUILD_TESTS OR SPDLOG_BUILD_TESTS_HO OR SPDLOG_BUILD_ALL)
|
||||||
message(STATUS "Generating tests")
|
message(STATUS "Generating tests")
|
||||||
enable_testing()
|
enable_testing()
|
||||||
add_subdirectory(tests)
|
add_subdirectory(tests)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(SPDLOG_BUILD_BENCH)
|
if(SPDLOG_BUILD_BENCH OR SPDLOG_BUILD_ALL)
|
||||||
message(STATUS "Generating benchmarks")
|
message(STATUS "Generating benchmarks")
|
||||||
add_subdirectory(bench)
|
add_subdirectory(bench)
|
||||||
endif()
|
endif()
|
||||||
|
@ -60,11 +60,11 @@ function(spdlog_prepare_test test_target spdlog_lib)
|
|||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
# The compiled library tests
|
# The compiled library tests
|
||||||
if(SPDLOG_BUILD_TESTS)
|
if(SPDLOG_BUILD_TESTS OR SPDLOG_BUILD_ALL)
|
||||||
spdlog_prepare_test(spdlog-utests spdlog::spdlog)
|
spdlog_prepare_test(spdlog-utests spdlog::spdlog)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# The header-only library version tests
|
# The header-only library version tests
|
||||||
if(SPDLOG_BUILD_TESTS_HO)
|
if(SPDLOG_BUILD_TESTS_HO OR SPDLOG_BUILD_ALL)
|
||||||
spdlog_prepare_test(spdlog-utests-ho spdlog::spdlog_header_only)
|
spdlog_prepare_test(spdlog-utests-ho spdlog::spdlog_header_only)
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user