Files
project_6/cccl_upstream/test/cmake/CMakeLists.txt
muh-bot 2a7ca101d7 feat(cccl): integrate missing CCCL directories — python/, ci/, .agent/, docs/, test/
Sparse-checkout from NVIDIA/cccl main branch to complete cccl_upstream:

Added:
- python/cuda_cccl/ (226 files) — Python bindings for device-level algorithms
  Critical for muh toolchain: cuda.compute.reduce_into, scan, radix_sort, etc.
  Includes 204 .py files with full test coverage for all 27 algorithms
- ci/ (163 files) — Build/test infrastructure
  build_cub.sh, test_cub.sh, build_and_test_targets.sh, matrix.yaml
  Directly maps to our [INFRA-CI] and [INFRA-BUILD] items
- .agent/skills/ (7 files) — NVIDIA's own agent skills for CCCL
  cccl-style/SKILL.md, cccl-test/SKILL.md, sass-diff/SKILL.md
- docs/ (491 files) — Official CCCL documentation
  CI references, CMake guides, Python compute docs, libcudacxx PTX docs
- test/ (12 files) — Top-level integration tests (cuda_smoke, stdpar)
- Root configs: .clang-format, .clang-tidy, CONTRIBUTING.md, pyproject.toml
- CLAUDE.md symlink → AGENTS.md (NVIDIA's standard)

cccl_upstream now mirrors full NVIDIA/cccl structure:
  Before: 42M (cub + thrust + libcudacxx + cudax + c + examples + benchmarks)
  After:  53M (+python +ci +docs +.agent +test +configs)

This completes the CCCL base needed for:
- [muh-bench] items: ci/util/build_and_test_targets.sh for targeted builds
- [CCCL-verify] items: python/cuda_cccl/tests/ as reference implementations
- [CCCL-test] items: ci/test_cub.sh, ci/test_thrust.sh
- Agent workflow: .agent/skills/ for consistent style and test patterns
2026-08-07 02:34:33 +00:00

79 lines
2.1 KiB
CMake

set(
cmake_opts
"-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}"
"-DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}"
"-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}"
)
# Temporary installation prefix for tests against installed project:
set(tmp_install_prefix "${CMAKE_CURRENT_BINARY_DIR}/test_install")
foreach (root_type IN ITEMS SOURCE INSTALL)
if (root_type STREQUAL "INSTALL")
set(cccl_root "${tmp_install_prefix}")
else()
set(cccl_root "${CCCL_SOURCE_DIR}")
endif()
set(comps DEFAULT Thrust CUB libcudacxx)
if (CCCL_ENABLE_UNSTABLE)
list(APPEND comps cudax)
endif()
foreach (components IN LISTS comps)
set(package_types CCCL)
if (NOT components STREQUAL "DEFAULT")
list(APPEND package_types NATIVE)
endif()
if (root_type STREQUAL "SOURCE")
list(APPEND package_types SUBDIR)
endif()
foreach (package_type IN LISTS package_types)
string(TOLOWER "${root_type}.${package_type}.${components}" suffix)
cccl_add_compile_test(
test_name
cccl.test.cmake
test_export
"${suffix}"
${cmake_opts}
"-DCCCL_ROOT=${cccl_root}"
"-DCOMPONENTS=${components}"
"-DPACKAGE_TYPE=${package_type}"
"-DCCCL_ENABLE_UNSTABLE=${CCCL_ENABLE_UNSTABLE}"
)
if (root_type STREQUAL "INSTALL")
set_tests_properties(
${test_name}
PROPERTIES FIXTURES_REQUIRED install_tree
)
endif()
endforeach() # package_type
endforeach() # components
endforeach() # root_type
################################################################################
# Install tree fixtures
add_test(
NAME cccl.test.cmake.install_tree.install
# gersemi: off
COMMAND
"${CMAKE_COMMAND}"
--install "${CCCL_BINARY_DIR}"
--prefix "${tmp_install_prefix}"
# gersemi: on
)
set_tests_properties(
cccl.test.cmake.install_tree.install
PROPERTIES FIXTURES_SETUP install_tree
)
add_test(
NAME cccl.test.cmake.install_tree.cleanup
COMMAND "${CMAKE_COMMAND}" -E rm -rf "${tmp_install_prefix}"
)
set_tests_properties(
cccl.test.cmake.install_tree.cleanup
PROPERTIES FIXTURES_CLEANUP install_tree
)