Skip to content

Commit

Permalink
Fix configuration when accelerator is enabled.
Browse files Browse the repository at this point in the history
  • Loading branch information
grospelliergilles committed Jan 24, 2024
1 parent ce847b1 commit 0ad8f22
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
13 changes: 3 additions & 10 deletions poisson/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0ad8f22

Please sign in to comment.