From bef178c52807a1ecd651e04feb58a8546f874fed Mon Sep 17 00:00:00 2001 From: youben11 Date: Wed, 28 Sep 2022 13:59:26 +0100 Subject: [PATCH] build: find CUDAToolkit library path requires setting min cmake version to 3.17 --- compiler/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/compiler/CMakeLists.txt b/compiler/CMakeLists.txt index 40d72236e..123e343e4 100644 --- a/compiler/CMakeLists.txt +++ b/compiler/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.13) +cmake_minimum_required(VERSION 3.17) project(concretecompiler LANGUAGES C CXX) @@ -64,6 +64,10 @@ if(CONCRETELANG_CUDA_SUPPORT) message(FATAL_ERROR "Compiling with CUDA support requires setting CONCRETE_CORE_PATH") endif() message(STATUS "Building with Concrete CUDA execution support") + find_package(CUDAToolkit REQUIRED) + message(STATUS "Found CUDA version: ${CUDAToolkit_VERSION}") + message(STATUS "Found CUDA library dir: ${CUDAToolkit_LIBRARY_DIR}") + link_directories(${CUDAToolkit_LIBRARY_DIR}) include_directories(${CONCRETE_CORE_PATH}/concrete-cuda/cuda/include) add_library(ConcreteCUDA STATIC IMPORTED) set_target_properties(ConcreteCUDA PROPERTIES IMPORTED_LOCATION ${CONCRETE_CORE_PATH}/concrete-cuda/cuda/build/src/libconcrete_cuda.a )