Commit 2cc620ef authored by Andrei-Florin BENCSIK's avatar Andrei-Florin BENCSIK

Function instead of macro

Be more consistent with the existing code and with the naming
_function -> function
parent cee705cc
...@@ -38,7 +38,7 @@ endif() ...@@ -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) ...@@ -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()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment