Warning, /EICrecon/src/tests/omnifactory_test/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 # Automatically set plugin name the same as the directory name
0002 get_filename_component(TEST_NAME ${CMAKE_CURRENT_LIST_DIR} NAME)
0003
0004 # These tests can use the Catch2-provided main
0005 add_executable(${TEST_NAME} JOmniFactoryTests.cc)
0006
0007 find_package(spdlog REQUIRED)
0008 find_package(fmt REQUIRED)
0009
0010 # Explicit linking to podio::podio is needed due to
0011 # https://github.com/JeffersonLab/JANA2/issues/151
0012 target_include_directories(
0013 ${TEST_NAME}
0014 PRIVATE ${PROJECT_BINARY_DIR} ${EICRECON_SOURCE_DIR}/src
0015 ${PROJECT_SOURCE_DIR} ${JANA_INCLUDE_DIR} ${ROOT_INCLUDE_DIRS}
0016 ${PROJECT_BINARY_DIR}/include)
0017 target_link_libraries(
0018 ${TEST_NAME}
0019 PRIVATE log_plugin
0020 EDM4EIC::edm4eic
0021 EDM4HEP::edm4hep
0022 ${JANA_LIB}
0023 podio::podio
0024 podio::podioRootIO
0025 ${ROOT_LIBRARIES}
0026 Catch2::Catch2WithMain
0027 ${CMAKE_DL_LIBS})
0028
0029 # Install executable
0030 install(TARGETS ${TEST_NAME} DESTINATION bin)
0031
0032 add_test(NAME t_${TEST_NAME} COMMAND env LLVM_PROFILE_FILE=${TEST_NAME}.profraw
0033 $<TARGET_FILE:${TEST_NAME}>)