set(LOG4TANGO_TEST_SOURCES test_log4tango.cpp)
set(BENCH_TEST_SOURCES clock.cpp clock.hh test_bench.cpp)

if(WIN32)
    add_executable(test_log4tango_dyn ${LOG4TANGO_TEST_SOURCES} $<TARGET_OBJECTS:log4tango_objects_dyn>)
    add_executable(test_bench_dyn ${BENCH_TEST_SOURCES} $<TARGET_OBJECTS:log4tango_objects_dyn>)
    add_executable(test_log4tango_sta ${LOG4TANGO_TEST_SOURCES} $<TARGET_OBJECTS:log4tango_objects_sta>)
    add_executable(test_bench_sta ${BENCH_TEST_SOURCES} $<TARGET_OBJECTS:log4tango_objects_sta>)
    target_compile_definitions(test_log4tango_dyn PRIVATE "${dyn_defs}")
    target_compile_definitions(test_log4tango_sta PRIVATE "${static_defs}")
    target_compile_definitions(test_bench_dyn PRIVATE "${dyn_defs}")
    target_compile_definitions(test_bench_sta PRIVATE "${static_defs}")

    if(CMAKE_BUILD_TYPE STREQUAL "Debug")
        target_compile_options(test_log4tango_sta PRIVATE "/MTd")
        target_compile_options(test_bench_sta PRIVATE "/MTd")
    else()
        target_compile_options(test_log4tango_sta PRIVATE "/MT")
        target_compile_options(test_bench_sta PRIVATE "/MT")
    endif()

    add_test("log4tango_test_dyn"       test_log4tango_dyn)
#    add_test("log4tango_benchmark_dyn"  test_bench_dyn)
    add_test("log4tango_test_sta"       test_log4tango_sta)
#    add_test("log4tango_benchmark_sta"  test_bench_sta)

else(WIN32)
    add_executable(test_log4tango ${LOG4TANGO_TEST_SOURCES} $<TARGET_OBJECTS:log4tango_objects>)
    add_executable(test_bench ${BENCH_TEST_SOURCES} $<TARGET_OBJECTS:log4tango_objects>)

    add_test("log4tango_test"       test_log4tango)
#    add_test("log4tango_benchmark"  test_bench)
endif(WIN32)
