From 7836152dd49e2eb53b50c1eabbe6f12cca931794 Mon Sep 17 00:00:00 2001 From: Marco Randazzo Date: Mon, 6 Mar 2023 16:21:57 +0100 Subject: [PATCH] Fixed CMakeLists.txt dependency error --- src/libYARP_cv/CMakeLists.txt | 4 ++++ {tests/libYARP_cv => src/libYARP_cv/tests}/CMakeLists.txt | 2 ++ {tests/libYARP_cv => src/libYARP_cv/tests}/LibYarpCVTest.cpp | 1 - tests/CMakeLists.txt | 1 - 4 files changed, 6 insertions(+), 2 deletions(-) rename {tests/libYARP_cv => src/libYARP_cv/tests}/CMakeLists.txt (94%) rename {tests/libYARP_cv => src/libYARP_cv/tests}/LibYarpCVTest.cpp (99%) diff --git a/src/libYARP_cv/CMakeLists.txt b/src/libYARP_cv/CMakeLists.txt index dad79a63ed0..508427bf59b 100644 --- a/src/libYARP_cv/CMakeLists.txt +++ b/src/libYARP_cv/CMakeLists.txt @@ -17,3 +17,7 @@ yarp_install_basic_package_files(YARP_cv DEPENDENCIES ${YARP_cv_PUBLIC_DEPS} PRIVATE_DEPENDENCIES ${YARP_cv_PRIVATE_DEPS} ) + +if(YARP_COMPILE_TESTS) + add_subdirectory(tests) +endif() diff --git a/tests/libYARP_cv/CMakeLists.txt b/src/libYARP_cv/tests/CMakeLists.txt similarity index 94% rename from tests/libYARP_cv/CMakeLists.txt rename to src/libYARP_cv/tests/CMakeLists.txt index 1226cd44dac..0748c53e523 100644 --- a/tests/libYARP_cv/CMakeLists.txt +++ b/src/libYARP_cv/tests/CMakeLists.txt @@ -1,6 +1,8 @@ # SPDX-FileCopyrightText: 2023-2023 Istituto Italiano di Tecnologia (IIT) # SPDX-License-Identifier: BSD-3-Clause +include(YarpCatchUtils) + add_executable(harness_libyarpcv) target_sources(harness_libyarpcv PRIVATE diff --git a/tests/libYARP_cv/LibYarpCVTest.cpp b/src/libYARP_cv/tests/LibYarpCVTest.cpp similarity index 99% rename from tests/libYARP_cv/LibYarpCVTest.cpp rename to src/libYARP_cv/tests/LibYarpCVTest.cpp index c6f0ce66428..4b4e4574927 100644 --- a/tests/libYARP_cv/LibYarpCVTest.cpp +++ b/src/libYARP_cv/tests/LibYarpCVTest.cpp @@ -11,7 +11,6 @@ #include #include #include -#include using namespace yarp::cv; using namespace yarp::os; diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index cf4c7e010d5..5e11ce053ce 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -133,7 +133,6 @@ add_subdirectory(libYARP_os/impl) add_subdirectory(libYARP_sig) add_subdirectory(libYARP_rosmsg) add_subdirectory(libYARP_dev) -add_subdirectory(libYARP_cv) add_subdirectory(libYARP_serversql) add_subdirectory(libYARP_run) add_subdirectory(libYARP_math)