CMakeLists.txt 1.47 KB
Newer Older
Mathis Rosenhauer's avatar
Mathis Rosenhauer committed
1
add_library(check_aec STATIC check_aec.c)
2

Mathis Rosenhauer's avatar
Mathis Rosenhauer committed
3 4 5 6 7 8 9 10 11 12 13 14 15
add_executable(check_code_options check_code_options.c)
target_link_libraries(check_code_options check_aec aec)
add_test(NAME check_code_options COMMAND check_code_options)
add_executable(check_buffer_sizes check_buffer_sizes.c)
target_link_libraries(check_buffer_sizes check_aec aec)
add_test(NAME check_buffer_sizes COMMAND check_buffer_sizes)
add_executable(check_long_fs check_long_fs.c)
target_link_libraries(check_long_fs check_aec aec)
add_test(NAME check_long_fs COMMAND check_long_fs)
add_executable(check_szcomp check_szcomp.c)
target_link_libraries(check_szcomp check_aec sz)
add_test(NAME check_szcomp
  COMMAND check_szcomp ${PROJECT_SOURCE_DIR}/data/121B2TestData/ExtendedParameters/sar32bit.dat)
16

Mathis Rosenhauer's avatar
Mathis Rosenhauer committed
17 18
if(UNIX)
  add_test(
19 20
    NAME sampledata.sh
    COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/sampledata.sh ${CMAKE_CURRENT_SOURCE_DIR}
Mathis Rosenhauer's avatar
Mathis Rosenhauer committed
21
    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
22 23 24 25 26 27 28 29 30 31 32 33 34

  set(SAMPLE_DATA_DIR "${PROJECT_SOURCE_DIR}/data")
  set(SAMPLE_DATA_NAME "121B2TestData")
  set(SAMPLE_DATA_URL "https://cwe.ccsds.org/sls/docs/SLS-DC/BB121B2TestData/121B2TestData.zip")
  add_custom_target(
    update-sampledata
    WORKING_DIRECTORY ${SAMPLE_DATA_DIR}
    COMMAND rm -rf ${SAMPLE_DATA_NAME}
    COMMAND curl ${SAMPLE_DATA_URL} -O
    COMMAND unzip "${SAMPLE_DATA_NAME}.zip"
    COMMAND rm -f "${SAMPLE_DATA_NAME}.zip"
    COMMAND mv -f "${SAMPLE_DATA_NAME}/AllOptions/test_P512n22.dat"
    "${SAMPLE_DATA_NAME}/AllOptions/test_p512n22.dat")
Mathis Rosenhauer's avatar
Mathis Rosenhauer committed
35
endif(UNIX)