CMakeLists.txt 908 B

123456789101112131415161718192021222324252627282930
  1. set(SINGLE_TEST_BINARY ON CACHE BOOL "Create single binary for all tests")
  2. set(ALL_TESTS
  3. morph
  4. convert
  5. )
  6. if (${SINGLE_TEST_BINARY})
  7. add_executable(test_all main.cpp ${ALL_TESTS})
  8. target_link_libraries(test_all fmt)
  9. target_link_libraries(test_all geom_helpers)
  10. target_link_libraries(test_all blas)
  11. target_link_libraries(test_all gsl)
  12. target_link_libraries(test_all morphing)
  13. target_link_libraries(test_all glib-2.0)
  14. target_include_directories(test_all
  15. SYSTEM BEFORE PUBLIC
  16. # ${LIB2GEOM_INCLUDE_DIRS}
  17. ${CATCH_INCLUDE_DIRS}
  18. )
  19. # target_link_libraries(test_all ${LIB2GEOM_LIBRARIES})
  20. add_test(test_all test_all)
  21. else()
  22. message(SEND_ERROR "Multiple test binaries support is not ready")
  23. # foreach (TEST_NAME ${ALL_TESTS})
  24. # add_executable(${TEST_NAME} main.cpp ${TEST_NAME})
  25. #
  26. # endforeach()
  27. endif()