From 593a81a177a007779ec7978473d3778abe93b57a Mon Sep 17 00:00:00 2001 From: Shahbaz Youssefi Date: Fri, 18 Dec 2015 13:15:24 -0500 Subject: [PATCH] Build simple_test, but don't install Signed-off-by: Shahbaz Youssefi --- CMakeLists.txt | 4 +--- test/linux/simple_test/CMakeLists.txt | 4 +++- test/linux/simple_test/simple_test.c | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b10cf3c..e81e59d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -67,6 +67,4 @@ install(FILES ${SOEM_HEADERS} ${OSAL_HEADERS} ${OSHW_HEADERS} DESTINATION ${SOEM add_subdirectory(test/linux/slaveinfo) add_subdirectory(test/linux/eepromtool) -if(NOT DEFINED HOST_INSTALL) - add_subdirectory(test/linux/simple_test) -endif() +add_subdirectory(test/linux/simple_test) diff --git a/test/linux/simple_test/CMakeLists.txt b/test/linux/simple_test/CMakeLists.txt index 1541576..344e1f5 100644 --- a/test/linux/simple_test/CMakeLists.txt +++ b/test/linux/simple_test/CMakeLists.txt @@ -9,4 +9,6 @@ elseif(UNIX) target_link_libraries(simple_test pthread rt) endif() -install(TARGETS simple_test DESTINATION bin) +if(NOT DEFINED HOST_INSTALL) + install(TARGETS simple_test DESTINATION bin) +endif() diff --git a/test/linux/simple_test/simple_test.c b/test/linux/simple_test/simple_test.c index 1ef7773..48216a4 100644 --- a/test/linux/simple_test/simple_test.c +++ b/test/linux/simple_test/simple_test.c @@ -11,6 +11,7 @@ #include #include +#include #include "ethercat.h" @@ -102,7 +103,7 @@ void simpletest(char *ifname) { printf(" %2.2x", *(ec_slave[0].inputs + j)); } - printf(" T:%lld\r",ec_DCtime); + printf(" T:%"PRId64"\r",ec_DCtime); needlf = TRUE; } osal_usleep(5000);