mirror of
https://github.com/gabime/spdlog.git
synced 2025-01-24 06:32:06 +08:00
Function instead of macro
Be more consistent with the existing code and with the naming _function -> function
This commit is contained in:
parent
cee705ccd3
commit
2cc620ef33
@ -38,7 +38,7 @@ endif()
|
|||||||
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/logs")
|
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/logs")
|
||||||
enable_testing()
|
enable_testing()
|
||||||
|
|
||||||
macro(_spdlog_prepare_test test_target spdlog_lib)
|
function(spdlog_prepare_test test_target spdlog_lib)
|
||||||
add_executable(${test_target} ${SPDLOG_UTESTS_SOURCES})
|
add_executable(${test_target} ${SPDLOG_UTESTS_SOURCES})
|
||||||
spdlog_enable_warnings(${test_target})
|
spdlog_enable_warnings(${test_target})
|
||||||
target_link_libraries(${test_target} PRIVATE ${spdlog_lib})
|
target_link_libraries(${test_target} PRIVATE ${spdlog_lib})
|
||||||
@ -49,14 +49,14 @@ macro(_spdlog_prepare_test test_target spdlog_lib)
|
|||||||
spdlog_enable_sanitizer(${test_target})
|
spdlog_enable_sanitizer(${test_target})
|
||||||
endif()
|
endif()
|
||||||
add_test(NAME ${test_target} COMMAND ${test_target})
|
add_test(NAME ${test_target} COMMAND ${test_target})
|
||||||
endmacro()
|
endfunction()
|
||||||
|
|
||||||
# The compiled library tests
|
# The compiled library tests
|
||||||
if(SPDLOG_BUILD_TESTS)
|
if(SPDLOG_BUILD_TESTS)
|
||||||
_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)
|
||||||
_spdlog_prepare_test(spdlog-utests-ho spdlog::spdlog_header_only)
|
spdlog_prepare_test(spdlog-utests-ho spdlog::spdlog_header_only)
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
Reference in New Issue
Block a user