From 1be3e424541360e3d899d37364f52f4a063f8620 Mon Sep 17 00:00:00 2001 From: Francesco Biscani Date: Fri, 31 Mar 2023 16:06:39 +0200 Subject: [PATCH 1/5] Add range-v3. --- recipes/range-v3/bld.bat | 21 +++++++++++++++++++++ recipes/range-v3/build.sh | 24 ++++++++++++++++++++++++ recipes/range-v3/meta.yaml | 37 +++++++++++++++++++++++++++++++++++++ 3 files changed, 82 insertions(+) create mode 100644 recipes/range-v3/bld.bat create mode 100644 recipes/range-v3/build.sh create mode 100644 recipes/range-v3/meta.yaml diff --git a/recipes/range-v3/bld.bat b/recipes/range-v3/bld.bat new file mode 100644 index 0000000000000..f2b27380c745e --- /dev/null +++ b/recipes/range-v3/bld.bat @@ -0,0 +1,21 @@ +mkdir build +cd build + +cmake ^ + -G "Visual Studio 16 2019" -A x64 ^ + -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..e060a9d266731 --- /dev/null +++ b/recipes/range-v3/meta.yaml @@ -0,0 +1,37 @@ +{% 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 + run_exports: + # Let's keep this conservative. + - {{ pin_subpackage('range-v3', max_pin='x.x') }} + +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 From b04bff82f3ec01c343a4e1c72572b92c35861ae1 Mon Sep 17 00:00:00 2001 From: Francesco Biscani Date: Sat, 8 Apr 2023 09:10:54 +0200 Subject: [PATCH 2/5] Review. --- recipes/range-v3/bld.bat | 3 +-- recipes/range-v3/meta.yaml | 3 --- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/recipes/range-v3/bld.bat b/recipes/range-v3/bld.bat index f2b27380c745e..57c0f0adb886d 100644 --- a/recipes/range-v3/bld.bat +++ b/recipes/range-v3/bld.bat @@ -1,8 +1,7 @@ mkdir build cd build -cmake ^ - -G "Visual Studio 16 2019" -A x64 ^ +cmake -G "Visual Studio 16 2019" -A x64 ^ -DCMAKE_PREFIX_PATH=%LIBRARY_PREFIX% ^ -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ -DBUILD_TESTING=YES ^ diff --git a/recipes/range-v3/meta.yaml b/recipes/range-v3/meta.yaml index e060a9d266731..5e5ed226d3a0b 100644 --- a/recipes/range-v3/meta.yaml +++ b/recipes/range-v3/meta.yaml @@ -10,9 +10,6 @@ source: build: number: 0 - run_exports: - # Let's keep this conservative. - - {{ pin_subpackage('range-v3', max_pin='x.x') }} requirements: build: From ff3baf17216fbe5fb29ec0b548ce47236bea348a Mon Sep 17 00:00:00 2001 From: Francesco Biscani Date: Thu, 20 Apr 2023 08:09:38 +0200 Subject: [PATCH 3/5] Update recipes/range-v3/bld.bat Co-authored-by: Isuru Fernando --- recipes/range-v3/bld.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/range-v3/bld.bat b/recipes/range-v3/bld.bat index 57c0f0adb886d..2689bd1bfd89e 100644 --- a/recipes/range-v3/bld.bat +++ b/recipes/range-v3/bld.bat @@ -1,7 +1,7 @@ mkdir build cd build -cmake -G "Visual Studio 16 2019" -A x64 ^ +cmake ^ -DCMAKE_PREFIX_PATH=%LIBRARY_PREFIX% ^ -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ -DBUILD_TESTING=YES ^ From c8fb4070ae1f2b66652231cae03279dfccf43f06 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Thu, 20 Apr 2023 01:29:08 -0500 Subject: [PATCH 4/5] Fix testing --- recipes/range-v3/bld.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/range-v3/bld.bat b/recipes/range-v3/bld.bat index 2689bd1bfd89e..4e12ba7f7607c 100644 --- a/recipes/range-v3/bld.bat +++ b/recipes/range-v3/bld.bat @@ -15,6 +15,6 @@ cmake ^ cmake --build . --config Release -ctest --output-on-failure -j${CPU_COUNT} -V -C Release +ctest --output-on-failure -j%CPU_COUNT% -V -C Release cmake --build . --config Release --target install From ada06e673c4cde6c0468f3d28486cba6b57c60fc Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Thu, 20 Apr 2023 02:55:33 -0500 Subject: [PATCH 5/5] Use nmake for now --- recipes/range-v3/bld.bat | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipes/range-v3/bld.bat b/recipes/range-v3/bld.bat index 4e12ba7f7607c..b57cbb8150879 100644 --- a/recipes/range-v3/bld.bat +++ b/recipes/range-v3/bld.bat @@ -1,7 +1,8 @@ mkdir build cd build -cmake ^ +:: 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 ^