diff --git a/CMakeLists.txt b/CMakeLists.txt index 126af20..cacea3a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,11 @@ cmake_minimum_required(VERSION 3.21) project(ArcaneFem LANGUAGES C CXX) find_package(Arcane REQUIRED) +arcane_accelerator_enable() + +if(ARCANE_HAS_ACCELERATOR) + message(STATUS "Arcane has been compiled with cuda. Enabling features that need CUDA.") +endif() enable_testing() diff --git a/poisson/CMakeLists.txt b/poisson/CMakeLists.txt index ac06795..efe7461 100644 --- a/poisson/CMakeLists.txt +++ b/poisson/CMakeLists.txt @@ -16,16 +16,9 @@ else() set (USE_CUSPARSE_ADD OFF) endif() -if(ARCANE_HAS_ACCELERATOR) - message(STATUS "Arcane has been compiled with cuda. Enabling features that need CUDA.") - arcane_accelerator_enable() - arcane_accelerator_add_source_files( - FemModule.cc - ) -else() - message(WARNING "Arcane has not been compiled with cuda. Disabling features that need CUDA.") -endif() - +arcane_accelerator_add_source_files( + FemModule.cc +) add_executable(Poisson FemModule.h