From 868c7ef3543224f3fdc449d9aaead49ed1d98186 Mon Sep 17 00:00:00 2001 From: Martina Gloria Date: Thu, 29 Feb 2024 11:58:38 +0100 Subject: [PATCH] Compile IMU test in the CI --- .github/workflows/ci.yml | 4 ++-- CMakeLists.txt | 5 ++--- src/imu/CMakeLists.txt | 1 + 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6187f11..310ca82 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,7 +42,7 @@ jobs: # Compilation related dependencies mamba install cmake compilers make ninja pkg-config # Actual dependencies - mamba install ycm-cmake-modules yarp opencv idyntree robot-testing-framework icub-main + mamba install ycm-cmake-modules yarp opencv idyntree robot-testing-framework icub-main robometry - name: Configure [Linux&macOS] if: contains(matrix.os, 'macos') || contains(matrix.os, 'ubuntu') @@ -60,7 +60,7 @@ jobs: mkdir -p build cd build cmake -G"Visual Studio 16 2019" -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install \ - -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} .. + -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DICUB_TESTS_COMPILES_IMU_TEST=ON .. - name: Build shell: bash -l {0} diff --git a/CMakeLists.txt b/CMakeLists.txt index 455f879..1d73283 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,7 +33,7 @@ set(CMAKE_SHARED_MODULE_PREFIX "") # options option(ICUB_TESTS_USES_ICUB_MAIN "Turn on to compile the tests that depend on the icub-main repository" ON) option(ICUB_TESTS_USES_CODYCO "Turn on to compile the test that depend on the codyco-superbuil repository" OFF) -option(ICUB_TESTS_USES_IDYNTREE "Turn on to compile the test that depend on the idyntree repository" OFF) +option(ICUB_TESTS_COMPILES_IMU_TEST "Turn on to compile the IMU test" OFF) # Build examples? add_subdirectory(example/cpp) @@ -101,8 +101,7 @@ add_subdirectory(src/skinWrapperTest) #add_subdirectory(src/system-status) # Build IMU test -if(ICUB_TESTS_USES_IDYNTREE) - find_package(iDynTree REQUIRED) +if(ICUB_TESTS_COMPILES_IMU_TEST) add_subdirectory(src/imu) endif() diff --git a/src/imu/CMakeLists.txt b/src/imu/CMakeLists.txt index eeb55ac..f9260b7 100644 --- a/src/imu/CMakeLists.txt +++ b/src/imu/CMakeLists.txt @@ -1,4 +1,5 @@ add_definitions(-D_USE_MATH_DEFINES) +find_package(iDynTree REQUIRED) find_package(robometry) robottestingframework_add_plugin(imu HEADERS imu.h