-
Notifications
You must be signed in to change notification settings - Fork 195
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate C2H library to top-level library (#2629)
Migrate CUB's c2h (catch2 helper) testing library to top-level.
- Loading branch information
1 parent
ae2d9d2
commit c0f20c2
Showing
126 changed files
with
1,021 additions
and
993 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
cmake_minimum_required(VERSION 3.21) | ||
|
||
project(C2H LANGUAGES CXX CUDA) | ||
|
||
cccl_get_catch2() | ||
|
||
find_package(CCCL CONFIG REQUIRED | ||
NO_DEFAULT_PATH # Only check the explicit HINTS below: | ||
HINTS "${CCCL_SOURCE_DIR}/lib/cmake/cccl/" | ||
) | ||
|
||
find_package(CUDAToolkit) | ||
|
||
set(curand_default OFF) | ||
if (CUDA_curand_LIBRARY) | ||
set(curand_default ON) | ||
endif() | ||
|
||
option(C2H_ENABLE_CURAND "Use CUDA CURAND library in c2h." ${curand_default}) | ||
|
||
add_library(cccl.c2h STATIC | ||
generators.cu | ||
) | ||
target_include_directories(cccl.c2h PUBLIC "${C2H_SOURCE_DIR}/include") | ||
target_link_libraries(cccl.c2h PUBLIC | ||
CCCL::CCCL | ||
Catch2::Catch2 | ||
) | ||
|
||
if (C2H_ENABLE_CURAND) | ||
target_link_libraries(cccl.c2h PRIVATE CUDA::curand) | ||
target_compile_definitions(cccl.c2h PRIVATE C2H_HAS_CURAND=1) | ||
else() | ||
target_compile_definitions(cccl.c2h PRIVATE C2H_HAS_CURAND=0) | ||
endif() | ||
|
||
add_library(cccl.c2h.main OBJECT | ||
catch2_runner.cpp | ||
catch2_runner_helper.cu | ||
) | ||
target_link_libraries(cccl.c2h.main PUBLIC cccl.c2h) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,13 @@ macro(cccl_get_boost) | |
CPMAddPackage("gh:boostorg/boost#boost-1.83.0") | ||
endmacro() | ||
|
||
# The CCCL Catch2Helper library: | ||
macro(cccl_get_c2h) | ||
if (NOT TARGET cccl.c2h) | ||
add_subdirectory("${CCCL_SOURCE_DIR}/c2h" "${CCCL_BINARY_DIR}/c2h") | ||
endif() | ||
endmacro() | ||
|
||
macro(cccl_get_catch2) | ||
include("${_cccl_cpm_file}") | ||
CPMAddPackage("gh:catchorg/[email protected]") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.