NVIDIA / NVIDIA/cccl

catch2_test_device_segmented_reduce_iterators_64bit.cu does not compile with CUB_CONFIG_MAIN defined.

Open
#1,628 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
2.5k
Forks
486
Avg merge
2d 6h
Merged PRs (30d)
295

Description

The culprit is the direct inclusion of ``:
https://github.com/NVIDIA/cccl/blob/1f87d3d4d1e93e066deb3f57ea1d4bad3fa5f6ed/cub/test/catch2_test_device_segmented_reduce_iterators_64bit.cu#L34

It results in the header being included with `CATCH_CONFIG_RUNNER` undefined, and that breaks `catch2_main.cuh` which needs to include catch.hpp with `CATCH_CONFIG_RUNNER`, but it's too late now.
https://github.com/NVIDIA/cccl/blob/1f87d3d4d1e93e066deb3f57ea1d4bad3fa5f6ed/cub/test/catch2_main.cuh#L38

`CATCH_CONFIG_RUNNER` should probably be done globally on the build level. Otherwise the compilation results will depend on which source file happened to include the catch header first, and which options were defined at that time.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.