Use CMake config of amgcl itself

This commit is contained in:
Tong Dong Qiu 2021-06-18 11:46:00 +02:00
parent 3c1bfeb72f
commit a08195a983
2 changed files with 3 additions and 8 deletions

View File

@ -213,16 +213,11 @@ if(OpenCL_FOUND)
endif()
endif()
# search for amgcl
find_file(AMG_HPP amgcl/amg.hpp HINTS ${AMGCL_INCLUDE_DIRS})
if(AMG_HPP)
find_package(amgcl)
if(amgcl_FOUND)
set(HAVE_AMGCL 1)
set(AMGCL_FOUND 1)
include_directories(${AMGCL_INCLUDE_DIRS})
set_source_files_properties(opm/simulators/linalg/bda/amgclSolverBackend.cpp PROPERTIES LANGUAGE CUDA)
else()
set(HAVE_AMGCL 0)
set(AMGCL_FOUND 0)
endif()
# read the list of components from this file (in the project directory);

View File

@ -114,7 +114,7 @@ if(HAVE_FPGA)
list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/MultisegmentWellContribution.cpp)
list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/WellContributions.cpp)
endif()
if(AMGCL_FOUND)
if(HAVE_AMGCL)
list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/amgclSolverBackend.cpp)
endif()
if(MPI_FOUND)