[CCCL] Add missing CCCL components: c2h, nvbench_helper, cmake, cudax, AGENTS.md
Added 863 files from NVIDIA/cccl sparse checkout: - c2h/ (27 files): Catch2 test helpers — generators, validators, runner - nvbench_helper/ (10 files): Benchmark harness utilities - cmake/ (29 files): CMake presets and build helpers - cudax/ (794 files): Experimental CUDA extensions - AGENTS.md: NVIDIA's official AI agent instructions for CCCL - CMakePresets.json: Standardized build configurations - cccl-version.json: Version tracking Also added CCCL_ASSET_MAP.md mapping all 4295 CCCL files to competition value and PRD items. cccl_upstream now covers 100% of competition-critical assets: - 27 tuning headers (SM80/90/100 benchmark data) - 32 dispatch headers (algorithm implementations) - 60 Thrust examples (correctness verification) - 217 CUB Catch2 tests (regression matrix) - 153 CUB benchmarks (parameter space search) - 18 CUB examples (API verification) - 27 test helpers + benchmark harness - 794 cudax experimental extensions
This commit is contained in:
66
cccl_upstream/cmake/CCCLConfigureTarget.cmake
Normal file
66
cccl_upstream/cmake/CCCLConfigureTarget.cmake
Normal file
@@ -0,0 +1,66 @@
|
||||
set(CCCL_EXECUTABLE_OUTPUT_DIR "${CCCL_BINARY_DIR}/bin")
|
||||
set(CCCL_LIBRARY_OUTPUT_DIR "${CCCL_BINARY_DIR}/lib")
|
||||
|
||||
# Setup common properties for all test/example/etc targets.
|
||||
function(cccl_configure_target target_name)
|
||||
set(options)
|
||||
set(oneValueArgs DIALECT)
|
||||
set(multiValueArgs)
|
||||
cmake_parse_arguments(
|
||||
CCT
|
||||
"${options}"
|
||||
"${oneValueArgs}"
|
||||
"${multiValueArgs}"
|
||||
${ARGN}
|
||||
)
|
||||
|
||||
get_target_property(type ${target_name} TYPE)
|
||||
|
||||
set_target_properties(
|
||||
${target_name}
|
||||
PROPERTIES
|
||||
# Disable compiler extensions:
|
||||
CXX_EXTENSIONS OFF
|
||||
CUDA_EXTENSIONS OFF
|
||||
)
|
||||
|
||||
if (DEFINED CCT_DIALECT)
|
||||
set(CMAKE_CXX_STANDARD ${CCT_DIALECT})
|
||||
set(CMAKE_CUDA_STANDARD ${CCT_DIALECT})
|
||||
endif()
|
||||
|
||||
set_target_properties(
|
||||
${target_name}
|
||||
PROPERTIES
|
||||
CXX_STANDARD ${CMAKE_CXX_STANDARD}
|
||||
CUDA_STANDARD ${CMAKE_CUDA_STANDARD}
|
||||
CXX_STANDARD_REQUIRED ON
|
||||
CUDA_STANDARD_REQUIRED ON
|
||||
)
|
||||
|
||||
get_property(langs GLOBAL PROPERTY ENABLED_LANGUAGES)
|
||||
set(dialect_features)
|
||||
if (CUDA IN_LIST langs)
|
||||
list(APPEND dialect_features cuda_std_${CMAKE_CUDA_STANDARD})
|
||||
endif()
|
||||
if (CXX IN_LIST langs)
|
||||
list(APPEND dialect_features cxx_std_${CMAKE_CXX_STANDARD})
|
||||
endif()
|
||||
|
||||
get_target_property(type ${target_name} TYPE)
|
||||
if (${type} STREQUAL "INTERFACE_LIBRARY")
|
||||
target_compile_features(${target_name} INTERFACE ${dialect_features})
|
||||
else()
|
||||
target_compile_features(${target_name} PUBLIC ${dialect_features})
|
||||
endif()
|
||||
|
||||
if (NOT ${type} STREQUAL "INTERFACE_LIBRARY")
|
||||
set_target_properties(
|
||||
${target_name}
|
||||
PROPERTIES
|
||||
ARCHIVE_OUTPUT_DIRECTORY "${CCCL_LIBRARY_OUTPUT_DIR}"
|
||||
LIBRARY_OUTPUT_DIRECTORY "${CCCL_LIBRARY_OUTPUT_DIR}"
|
||||
RUNTIME_OUTPUT_DIRECTORY "${CCCL_EXECUTABLE_OUTPUT_DIR}"
|
||||
)
|
||||
endif()
|
||||
endfunction()
|
||||
Reference in New Issue
Block a user