Build and link the Geometry SDK#
Choose the interface your client uses. The installed consumer fixture uses CMake 3.28 and CUDA Toolkit 13.0.
Client interface |
Route |
|---|---|
C or C++ Geometry SDK |
Find |
CUDA device interop |
Enable |
libcudf columns |
Follow Integrate Geometry with libcudf columns for its CMake 4.0, CUDA 13 and cuDF workflow. |
Typed host C ABI |
Use the Cargo-built |
|
Choose descriptor validation or a runtime build as described below. |
Install the components the client requests#
Build and install the SDK source with the cugeo-geometry-cuda build and install recipe. Choose an install prefix for the files your client will consume. The installed consumer fixture requests contract_digest, geometry_constructors_device, geometry_gather_wkb_mixed and point_geography_distance from the installed package.
Use the native setup script#
For the broader native setup script route, use Linux x86-64 or aarch64 with glibc 2.38 or later and an NVIDIA driver for CUDA 13. Install micromamba, mamba or conda. Choose --prefix for the installation location, --arch for the target architecture and --jobs for compiler concurrency. Optional Proj builds have additional dependencies.
Choose a cuDF backend build#
For cugeo::geometry_cudf, descriptor validation can build without target execution. A runtime build has additional dependencies and is a separate choice.
Build and run a client against the installed prefix#
The following consumer builds the installed digest-check fixture. Save this as CMakeLists.txt in a separate client directory and copy contract_digest.c into that directory.
cmake_minimum_required(VERSION 3.28)
project(geometry_client LANGUAGES C)
find_package(cugeo_geometry_cuda CONFIG REQUIRED COMPONENTS
contract_digest
geometry_constructors_device
geometry_gather_wkb_mixed
point_geography_distance)
find_package(CUDAToolkit 13.0 REQUIRED)
add_executable(probe contract_digest.c)
target_compile_features(probe PRIVATE c_std_11)
target_compile_definitions(probe PRIVATE
"EXPECTED_CONTRACT_DIGEST=\"${cugeo_geometry_cuda_CONTRACT_DIGEST}\"")
target_link_libraries(probe PRIVATE cugeo::geometry_cuda CUDA::cuda_driver)
Build with the locked Linux package#
The following recipe uses the locked Linux x86-64 package build. Set prefix to the prefix used by tools/build_native.sh and consumer to the directory containing the CMakeLists.txt and copied contract_digest.c.
prefix=/path/to/native-prefix
consumer=/path/to/geometry-client
toolchain=$prefix/env
"$toolchain/bin/cmake" -S "$consumer" -B "$consumer/target" \
-DCMAKE_PREFIX_PATH="$prefix/cugeo-geometry-cuda-sdk" \
-DCUDAToolkit_ROOT="$toolchain" \
-DCMAKE_C_COMPILER="$toolchain/bin/x86_64-conda-linux-gnu-gcc" \
"-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath-link,$toolchain/lib"
"$toolchain/bin/cmake" --build "$consumer/target"
env LD_LIBRARY_PATH="$toolchain/lib" "$consumer/target/probe"
The linker option lets GNU ld locate the CUDA toolkit and C++ runtime libraries. LD_LIBRARY_PATH selects those libraries when the probe launches.
Successful configuration resolves the installed target and requested components. The probe exits successfully when the CMake package, header and library contract digests agree. It prints an error and exits nonzero if they differ. Component availability, provider selection and qualification are separate facts. See the SDK API declarations for build identity and capability queries.
Build a CUDA device consumer#
For a CUDA device consumer, configure the checked installed fixture with -DCUGEO_GEOMETRY_CUDA_TEST_CUDA_INTEROP=ON and build installed_direct_device. It uses the installed direct_device.cu example and links CUDA::cudart as well as the SDK and CUDA driver targets. For operation descriptors and their fields, see Geometry SDK operations and data structures.