diff --git a/recipes/ycm-cmake-modules/bld.bat b/recipes/ycm-cmake-modules/bld.bat new file mode 100644 index 0000000000000..77ca3c04277cc --- /dev/null +++ b/recipes/ycm-cmake-modules/bld.bat @@ -0,0 +1,23 @@ +mkdir build +cd build + +cmake ^ + -G "Ninja" ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DBUILD_TESTING=ON ^ + %SRC_DIR% +if errorlevel 1 exit 1 + +:: Build. +cmake --build . --config Release +if errorlevel 1 exit 1 + +:: Install. +cmake --build . --config Release --target install +if errorlevel 1 exit 1 + +:: Test. +:: Some tests disabled for https://github.com/robotology/ycm/issues/382 +ctest --output-on-failure -C Release -E "YCMBootstrap-not-use-system|YCMBootstrap-disable-find|RunCMake.IncludeUrl" +if errorlevel 1 exit 1 diff --git a/recipes/ycm-cmake-modules/build.sh b/recipes/ycm-cmake-modules/build.sh new file mode 100644 index 0000000000000..3d1d64a20b4ac --- /dev/null +++ b/recipes/ycm-cmake-modules/build.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +mkdir build +cd build + +cmake ${CMAKE_ARGS} -GNinja .. \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_TESTING=ON + +cmake --build . --config Release +cmake --build . --config Release --target install +# Some tests disabled due to https://github.com/robotology/ycm/issues/382 +ctest --output-on-failure -C Release -E "YCMBootstrap-not-use-system|YCMBootstrap-disable-find|RunCMake.IncludeUrl" diff --git a/recipes/ycm-cmake-modules/meta.yaml b/recipes/ycm-cmake-modules/meta.yaml new file mode 100644 index 0000000000000..bb0c3a0ca08fa --- /dev/null +++ b/recipes/ycm-cmake-modules/meta.yaml @@ -0,0 +1,34 @@ +{% set version = "0.12.2" %} + +package: + name: ycm-cmake-modules + version: {{ version }} + +source: + url: https://github.com/robotology/ycm/archive/refs/tags/v{{ version }}.tar.gz + sha256: 42afdd754ba69a9d9b30279be3525bd9aefc8189ae5012701f37edf7be7e194d + +build: + number: 0 + +requirements: + build: + - cmake + - {{ compiler('cxx') }} + - {{ compiler('c') }} + - ninja + +test: + commands: + - test -f ${PREFIX}/share/cmake/YCM/YCMConfig.cmake # [not win] + - if not exist %PREFIX%\\Library\\share\\cmake\\YCM\\YCMConfig.cmake exit 1 # [win] + +about: + home: https://github.com/robotology/ycm + license: BSD-3-Clause + license_file: Copyright.txt + summary: Extra CMake Modules for YARP and friends. + +extra: + recipe-maintainers: + - traversaro