Skip to content

Commit

Permalink
tests: Move iio_adi_xflow_check to examples
Browse files Browse the repository at this point in the history
This tool is very ADI-specific and not really useful as a generic
IIO utility. Therefore, it makes more sense to have it as part of the
examples.

Signed-off-by: Paul Cercueil <[email protected]>
  • Loading branch information
pcercuei committed May 11, 2023
1 parent fe21df7 commit 800c394
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
7 changes: 7 additions & 0 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,13 @@ else()
message(STATUS "Curses Development Kit (CDK) missing or too old, skipping iio-monitor")
endif ()

if (PTHREAD_LIBRARIES OR ANDROID)
project(iio_adi_xflow_check C)
add_executable(iio_adi_xflow_check iio_adi_xflow_check.c)
target_link_libraries(iio_adi_xflow_check iio iio_tests_helper ${PTHREAD_LIBRARIES})
set(IIO_TESTS_TARGETS ${IIO_TESTS_TARGETS} iio_adi_xflow_check)
endif()

set_target_properties(
${IIO_TESTS_TARGETS} PROPERTIES C_STANDARD 99 C_STANDARD_REQUIRED ON
C_EXTENSIONS OFF
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <string.h>
#include <unistd.h>

#include "iio_common.h"
#include "../tests/iio_common.h"


#define MY_NAME "iio_adi_xflow_check"
Expand Down
5 changes: 1 addition & 4 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,10 @@ target_link_libraries(iio_writedev iio iio_tests_helper)
set(IIO_TESTS_TARGETS iio_genxml iio_info iio_attr iio_readdev iio_reg iio_writedev)

if(PTHREAD_LIBRARIES OR ANDROID)
project(iio_adi_xflow_check C)
project(iio_stresstest C)
add_executable(iio_adi_xflow_check iio_adi_xflow_check.c)
add_executable(iio_stresstest iio_stresstest.c)
target_link_libraries(iio_adi_xflow_check iio iio_tests_helper ${PTHREAD_LIBRARIES})
target_link_libraries(iio_stresstest iio iio_tests_helper ${PTHREAD_LIBRARIES})
set(IIO_TESTS_TARGETS ${IIO_TESTS_TARGETS} iio_adi_xflow_check iio_stresstest)
set(IIO_TESTS_TARGETS ${IIO_TESTS_TARGETS} iio_stresstest)

target_link_libraries(iio_readdev ${PTHREAD_LIBRARIES})
target_link_libraries(iio_writedev ${PTHREAD_LIBRARIES})
Expand Down

0 comments on commit 800c394

Please sign in to comment.