

set -ex



if [ ! -f "${PREFIX}/bin/ar" ]; then ln -s "${AR}" "${PREFIX}/bin/ar"; fi
nvcc --version
$CXX --verbose ${CXXFLAGS} -lcuda -lcudart_static test.cpp
nvcc --verbose test.cu
cmake ${CMAKE_ARGS} -S . -B ./build -G=Ninja
cmake --build ./build -v
bash ./run_cmake_cuda_tests.sh
test -f $PREFIX/etc/conda/activate.d/~cuda-nvcc_activate.sh
test -f $PREFIX/etc/conda/deactivate.d/~cuda-nvcc_deactivate.sh
exit 0
