CMakeLists.txt 696 Bytes
Newer Older
1
project(spdlog-utests CXX)
2

3 4 5
find_package(Threads REQUIRED)

set(SPDLOG_UTESTS_SOURCES
gabime's avatar
gabime committed
6
    test_errors.cpp
gabime's avatar
gabime committed
7
    test_file_helper.cpp
gabime's avatar
gabime committed
8
    test_file_logging.cpp
gabime's avatar
gabime committed
9
    test_misc.cpp
10
    test_pattern_formatter.cpp
gabime's avatar
gabime committed
11
    test_async.cpp
12
    includes.h
13
    test_registry.cpp
14 15 16
    test_macros.cpp
    utils.cpp
    utils.h
17 18 19
    main.cpp
    test_mpmc_q.cpp
    test_sink.h
gabime's avatar
gabime committed
20
    test_fmt_helper.cpp)
21 22 23

add_executable(${PROJECT_NAME} ${SPDLOG_UTESTS_SOURCES})
target_link_libraries(${PROJECT_NAME} PRIVATE Threads::Threads)
24
target_link_libraries(${PROJECT_NAME} PRIVATE spdlog::spdlog)
25 26

file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/logs")
27 28 29

enable_testing()
add_test(NAME ${PROJECT_NAME} COMMAND ${PROJECT_NAME})