CMakeLists.txt 411 B

123456789
  1. file(GLOB TEST_C_FILES "*.c")
  2. foreach(TEST_C_FILE ${TEST_C_FILES})
  3. get_filename_component(TEST_C_EXE ${TEST_C_FILE} NAME_WE)
  4. add_executable(${TEST_C_EXE} ${TEST_C_FILE})
  5. target_link_libraries(${TEST_C_EXE} ${GY_LIBS} gy)
  6. add_test(${TEST_C_EXE} ${TEST_C_EXE})
  7. # Make sure that ctest shows the test error messages if there are any.
  8. set(CMAKE_CTEST_OPTIONS --output-on-failure)
  9. endforeach(TEST_C_FILE)