add_library(utilities OBJECT utilities.c)
target_link_libraries(utilities PUBLIC astro-informatics-so3)
foreach(testname sampling so3 convolution)
  add_executable(test_${testname} test_${testname}.c)
  target_link_libraries(test_${testname} PRIVATE astro-informatics-so3 cmocka)
  set_target_properties(
    test_${testname} PROPERTIES C_STANDARD 11 RUNTIME_OUTPUT_DIRECTORY
                                              ${PROJECT_BINARY_DIR}/bin)
  add_test(NAME test_${testname} COMMAND test_${testname})
endforeach()
foreach(testname so3 convolution)
  target_link_libraries(test_${testname} PRIVATE utilities)
endforeach()
