Goose  Artifact [e55083e2c4]

Artifact e55083e2c446f57460279a251e3ff51142a9d1d34c387ff1604eb5767d42cb4c:

  • File bs/sema/tests/CMakeLists.txt — part of check-in [9722f7aa3f] at 2023-08-13 18:04:13 on branch trunk — It turns out cmake hadn't, in fact, failed me for the last time: migrating back from meson to cmake (user: zlodo size: 774)

find_package(Catch2 2.13.0 REQUIRED)

function( gooseAddSemaTest name ${ARGN} )
    set( fullname eir-${name} )
    set( testfile tests/${fullname} )
    add_executable( test-${fullname} ${ARGN} )
    set_target_properties( test-${fullname} PROPERTIES OUTPUT_NAME ${testfile} )

    target_link_libraries( test-${fullname} PRIVATE
        goose-sema
        goose-eir
        goose-util
        goose-diagnostics
        Catch2::Catch2 )

    llvm_config( test-${fullname} USE_SHARED )

    add_test( NAME ${fullname} COMMAND test-${fullname} WORKING_DIRECTORY ${PROJECT_BINARY_DIR} )
endfunction( gooseAddSemaTest )

gooseAddSemaTest( unify-holes unify-holes.cpp )
gooseAddSemaTest( tctrie-merge tctrie-merge.cpp )
gooseAddSemaTest( tctrie-typecheck tctrie-typecheck.cpp )