diff --git a/recipes/range-v3/bld.bat b/recipes/range-v3/bld.bat new file mode 100644 index 0000000000000..b57cbb8150879 --- /dev/null +++ b/recipes/range-v3/bld.bat @@ -0,0 +1,21 @@ +mkdir build +cd build + +:: Generator can be removed once https://github.com/conda-forge/conda-forge-pinning-feedstock/pull/4357 is in +cmake -G "NMake Makefiles" ^ + -DCMAKE_PREFIX_PATH=%LIBRARY_PREFIX% ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + -DBUILD_TESTING=YES ^ + -DRANGES_ASSERTIONS=NO ^ + -DRANGES_BUILD_CALENDAR_EXAMPLE=NO ^ + -DRANGES_DEBUG_INFO=NO ^ + -DRANGE_V3_DOCS=NO ^ + -DRANGE_V3_EXAMPLES=NO ^ + -DRANGE_V3_TESTS=YES ^ + .. + +cmake --build . --config Release + +ctest --output-on-failure -j%CPU_COUNT% -V -C Release + +cmake --build . --config Release --target install diff --git a/recipes/range-v3/build.sh b/recipes/range-v3/build.sh new file mode 100644 index 0000000000000..f41960a33f581 --- /dev/null +++ b/recipes/range-v3/build.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash + +mkdir build +cd build + +cmake ${CMAKE_ARGS} \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DBUILD_TESTING=YES \ + -DCMAKE_BUILD_TYPE=Release \ + -DRANGES_ASSERTIONS=NO \ + -DRANGES_BUILD_CALENDAR_EXAMPLE=NO \ + -DRANGES_DEBUG_INFO=NO \ + -DRANGE_V3_DOCS=NO \ + -DRANGE_V3_EXAMPLES=NO \ + -DRANGE_V3_TESTS=YES \ + .. + + +make -j${CPU_COUNT} VERBOSE=1 + +ctest -j${CPU_COUNT} --output-on-failure + +make install diff --git a/recipes/range-v3/meta.yaml b/recipes/range-v3/meta.yaml new file mode 100644 index 0000000000000..5e5ed226d3a0b --- /dev/null +++ b/recipes/range-v3/meta.yaml @@ -0,0 +1,34 @@ +{% set version = "0.12.0" %} + +package: + name: range-v3 + version: {{ version }} + +source: + url: https://github.com/ericniebler/range-v3/archive/refs/tags/{{ version }}.tar.gz + sha256: 015adb2300a98edfceaf0725beec3337f542af4915cec4d0b89fa0886f4ba9cb + +build: + number: 0 + +requirements: + build: + - {{ compiler('c') }} + - {{ compiler('cxx') }} + - cmake + - make # [unix] + +test: + commands: + - test -f $PREFIX/include/range/v3/all.hpp # [unix] + - if not exist %PREFIX%\\Library\\include\\range\\v3\\all.hpp exit 1 # [win] + +about: + home: https://github.com/ericniebler/range-v3 + license: BSL-1.0 + license_file: LICENSE.txt + summary: Range library for C++14/17/20, basis for C++20's std::ranges + +extra: + recipe-maintainers: + - bluescarni