Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions easybuild/easyconfigs/c/Catch2/Catch2-2.13.9.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
easyblock = 'CMakeMake'

name = 'Catch2'
version = '2.13.9'

homepage = 'https://github.com/catchorg/Catch2'
description = """A modern, C++-native, header-only,
test framework for unit-tests, TDD and BDD
- using C++11, C++14, C++17 and later
"""

toolchain = SYSTEM

source_urls = ['https://github.com/catchorg/Catch2/archive/']
sources = ['v%(version)s.tar.gz']
checksums = ['06dbc7620e3b96c2b69d57bf337028bf245a211b3cddb843835bfe258f427a52']

# using CMake built with GCCcore to avoid relying on the system compiler to build it
builddependencies = [
('GCCcore', '10.2.0'), # required to a access CMake when using hierarchical module naming scheme
('binutils', '2.35', '', ('GCCcore', '10.2.0')), # to make CMake compiler health check pass on old systems
('CMake', '3.18.4', '', ('GCCcore', '10.2.0')),
]

separate_build_dir = True

sanity_check_paths = {
'files': [],
'dirs': ['include/catch2', 'lib64/cmake'],
}

moduleclass = 'lib'
14 changes: 11 additions & 3 deletions easybuild/easyconfigs/p/pybind11/pybind11-2.10.3-GCCcore-12.2.0.eb
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,23 @@ toolchain = {'name': 'GCCcore', 'version': '12.2.0'}

source_urls = ['https://github.com/pybind/pybind11/archive/']
sources = ['v%(version)s.tar.gz']
checksums = ['5d8c4c5dda428d3a944ba3d2a5212cb988c2fae4670d58075a5a49075a6ca315']
patches = [
'pybind11-2.10.3_fix-nvcc-compat.patch',
'pybind11-2.10.3_require-catch.patch',
]
checksums = [
{'v2.10.3.tar.gz': '5d8c4c5dda428d3a944ba3d2a5212cb988c2fae4670d58075a5a49075a6ca315'},
{'pybind11-2.10.3_fix-nvcc-compat.patch': '510a23dac47b8b440c06c101d269451c95e09907d9034b6b8a16aeb8b89364ae'},
{'pybind11-2.10.3_require-catch.patch': '4a27ba3ef1d5c535d120d6178a6e876ae678e4899a07500aab37908357b0b60b'},
]

builddependencies = [
('binutils', '2.39'),
('CMake', '3.24.3'),
# Test dependencies
('Eigen', '3.4.0'),
('Catch2', '2.13.9', '', SYSTEM),
]
dependencies = [('Python', '3.10.8')]

configopts = "-DPYTHON_EXECUTABLE=$EBROOTPYTHON/bin/python"
Comment thread
Micket marked this conversation as resolved.

moduleclass = 'lib'
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
NVCC of CUDA 12 (and seemingly also CUDA 11.7 in some configureations)
fail to parse the expression and fail with
> pybind11/detail/../cast.h: In function ‘typename pybind11::detail::type_caster<typename pybind11::detail::intrinsic_type<T>::type
> ::cast_op_type<T> pybind11::detail::cast_op(make_caster<T>&)’:
> pybind11/detail/../cast.h:45:120: error: expected template-name before ‘<’ token
> 45 | return caster.operator typename make_caster<T>::template cast_op_type<T>();

See https://github.com/pybind/pybind11/issues/4606
Disambiguate the expression to workaround this.

Author: Alexander Grund (TU Dresden)

diff --git a/include/pybind11/cast.h b/include/pybind11/cast.h
index 3a404602..1eefd0f1 100644
--- a/include/pybind11/cast.h
+++ b/include/pybind11/cast.h
@@ -42,13 +42,14 @@ using make_caster = type_caster<intrinsic_t<type>>;
// Shortcut for calling a caster's `cast_op_type` cast operator for casting a type_caster to a T
template <typename T>
typename make_caster<T>::template cast_op_type<T> cast_op(make_caster<T> &caster) {
- return caster.operator typename make_caster<T>::template cast_op_type<T>();
+ using result_t = typename make_caster<T>::template cast_op_type<T>;
+ return caster.operator result_t();
}
template <typename T>
typename make_caster<T>::template cast_op_type<typename std::add_rvalue_reference<T>::type>
cast_op(make_caster<T> &&caster) {
- return std::move(caster).operator typename make_caster<T>::
- template cast_op_type<typename std::add_rvalue_reference<T>::type>();
+ using result_t = typename make_caster<T>::template cast_op_type<typename std::add_rvalue_reference<T>::type>;
+ return std::move(caster).operator result_t();
}

template <typename type>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Error out if Catch2 is not found instead of silently skipping.

Author: Alexander Grund (TU Dresden)

diff --git a/tools/FindCatch.cmake b/tools/FindCatch.cmake
index 57bba58b..41f82e5c 100644
--- a/tools/FindCatch.cmake
+++ b/tools/FindCatch.cmake
@@ -60,9 +60,10 @@ if(NOT CATCH_VERSION OR CATCH_VERSION VERSION_LESS ${Catch_FIND_VERSION})
if(DOWNLOAD_CATCH)
_download_catch(${Catch_FIND_VERSION} "${PROJECT_BINARY_DIR}/catch/")
_get_catch_version()
+ elseif(CATCH_INCLUDE_DIR)
+ message(FATAL_ERROR "Catch (${CATCH_INCLUDE_DIR}) version to low: ${CATCH_VERSION} < ${Catch_FIND_VERSION}")
else()
- set(CATCH_FOUND FALSE)
- return()
+ message(FATAL_ERROR "Catch not found")
endif()
endif()

18 changes: 12 additions & 6 deletions easybuild/easyconfigs/p/pybind11/pybind11-2.11.1-GCCcore-12.3.0.eb
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,24 @@ toolchain = {'name': 'GCCcore', 'version': '12.3.0'}

source_urls = ['https://github.com/pybind/pybind11/archive/']
sources = ['v%(version)s.tar.gz']
checksums = ['d475978da0cdc2d43b73f30910786759d593a9d8ee05b1b6846d1eb16c6d2e0c']
patches = [
'pybind11-2.10.3_fix-nvcc-compat.patch',
'pybind11-2.10.3_require-catch.patch',
]
checksums = [
{'v2.11.1.tar.gz': 'd475978da0cdc2d43b73f30910786759d593a9d8ee05b1b6846d1eb16c6d2e0c'},
{'pybind11-2.10.3_fix-nvcc-compat.patch': '510a23dac47b8b440c06c101d269451c95e09907d9034b6b8a16aeb8b89364ae'},
{'pybind11-2.10.3_require-catch.patch': '4a27ba3ef1d5c535d120d6178a6e876ae678e4899a07500aab37908357b0b60b'},
]

builddependencies = [
('binutils', '2.40'),
('CMake', '3.26.3'),
# Test dependencies
('Eigen', '3.4.0'),
('Catch2', '2.13.9', '', SYSTEM),
('Python-bundle-PyPI', '2023.06'), # to provide pytest
]
dependencies = [
('Python', '3.11.3'),
]

configopts = "-DPYTHON_EXECUTABLE=$EBROOTPYTHON/bin/python"
dependencies = [('Python', '3.11.3')]

moduleclass = 'lib'