From 04eb304fd82e03d43155bf0da135a1be9975dd97 Mon Sep 17 00:00:00 2001 From: cmoineau <cyril.moineau@cea.fr> Date: Mon, 2 Dec 2024 15:35:01 +0000 Subject: [PATCH] Fix CmakeLists dependencies of CUDA. --- CMakeLists.txt | 8 +------- unit_tests/CMakeLists.txt | 4 ++-- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 00d6d6c..1b5a43f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,7 @@ file(STRINGS "${CMAKE_SOURCE_DIR}/version.txt" version) project(aidge_learning VERSION ${version} - DESCRIPTION "Functions and alogrithms to train models in the AIDGE framework" + DESCRIPTION "Functions and alogrithms to train models in the AIDGE framework" LANGUAGES CXX) message(STATUS "Project name: ${CMAKE_PROJECT_NAME}") @@ -42,12 +42,6 @@ if(NOT $ENV{AIDGE_INSTALL} STREQUAL "") endif() find_package(aidge_core REQUIRED) -# Enable CUDA if backend_cuda is found -find_package(aidge_backend_cuda) - -if(aidge_backend_cuda_FOUND) - enable_language(CUDA) -endif() ############################################## # Create target and set properties diff --git a/unit_tests/CMakeLists.txt b/unit_tests/CMakeLists.txt index 39af9ec..07d35e3 100644 --- a/unit_tests/CMakeLists.txt +++ b/unit_tests/CMakeLists.txt @@ -45,11 +45,11 @@ if(aidge_backend_cuda_FOUND) # Enable CUDA language support and separable compilation for the target enable_language(CUDA) set_target_properties(${tests_exe} PROPERTIES CUDA_SEPARABLE_COMPILATION ON) - + target_include_directories(${tests_exe} PRIVATE ${CUDAToolkit_INCLUDE_DIRS}) # Link manually specified CUDA libraries if the targets are not available target_link_libraries(${tests_exe} - PUBLIC + PUBLIC _aidge_backend_cuda CUDA::cudart CUDA::cublas -- GitLab