Commit 7a6fd9ed authored by Thomas Braun's avatar Thomas Braun
Browse files

tests: Don't compile the DummyClass libraries on Windows

These currently trigger compile errors with cmake 4.2.0. The names of the
libraries seem to be clashing. See [1] for the upstream issue.

The test requiring these libraries is also not run on windows, see
54a2830d (tests/catch2_create_cpp_class.cpp: test cpp class loading.,
2025-05-14), so this is not a testing loss.

[1]: https://gitlab.kitware.com/cmake/cmake/-/issues/27442
parent 1e5b48f5
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -7,8 +7,6 @@ include(Catch)

set(TANGO_CATCH2_TESTS_DIR ${CMAKE_CURRENT_LIST_DIR})

add_subdirectory(DummyClass)

function(tango_catch2_tests_create)
    set(TEST_FILES ${ARGN})

@@ -66,7 +64,11 @@ function(tango_catch2_tests_create)
        common.cpp
        ${PLATFORM_IMPL})

    if(NOT WIN32)
      add_subdirectory(DummyClass)
      add_dependencies(Catch2Tests DummyClass DummyClassPrefix DummyClassUnPrefix)
    endif()

    target_link_libraries(Catch2Tests PUBLIC Tango::Tango Catch2::Catch2)
    target_link_libraries(Catch2Tests PRIVATE $<$<AND:$<CXX_COMPILER_ID:GNU>,$<VERSION_LESS:$<CXX_COMPILER_VERSION>,9.0>>:stdc++fs>)
    target_include_directories(Catch2Tests PUBLIC ${TANGO_CATCH2_TESTS_DIR} ${CMAKE_CURRENT_SOURCE_DIR})