# =============================================================================
# cmake-format: off
# SPDX-FileCopyrightText: Copyright (c) 2022-2026, NVIDIA CORPORATION.
# SPDX-License-Identifier: Apache-2.0
# cmake-format: on
# =============================================================================
cmake_minimum_required(VERSION 4.0)
project(rapids-test-project LANGUAGES CUDA CXX)

include(${rapids-cmake-dir}/rapids-test.cmake)

set(CTEST_RESOURCE_SPEC_FILE "fake-value-to-stop-generation")
rapids_test_init()
unset(CTEST_RESOURCE_SPEC_FILE)

find_package(CUDAToolkit REQUIRED)
add_executable(verify_no_alloc main.cpp)
target_compile_features(verify_no_alloc PRIVATE cxx_std_17)

target_include_directories(verify_no_alloc PRIVATE "${rapids-cmake-dir}/../docs/cpp_code_snippets/")
target_link_libraries(verify_no_alloc PRIVATE CUDA::cudart)

enable_testing()
add_test(NAME simple_test COMMAND verify_no_alloc)
rapids_test_gpu_requirements(simple_test GPUS 1)

# Validate that the test runs correctly
set_tests_properties(simple_test PROPERTIES PASS_REGULAR_EXPRESSION
                                            "failed to have a resource file")
