-
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
example:metis,scotch: use MUMPS config
- Loading branch information
Showing
2 changed files
with
8 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,21 @@ | ||
cmake_minimum_required(VERSION 3.13...3.25) | ||
cmake_minimum_required(VERSION 3.19) | ||
|
||
project(MUMPSmetisExamples | ||
LANGUAGES C Fortran | ||
) | ||
|
||
enable_testing() | ||
|
||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/../../cmake/) | ||
|
||
if(CMAKE_C_COMPILER_ID MATCHES "Clang|GNU|Intel") | ||
add_compile_options($<$<COMPILE_LANGUAGE:C>:-Werror-implicit-function-declaration>) | ||
endif() | ||
|
||
if(NOT PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR) | ||
file(GENERATE OUTPUT .gitignore CONTENT "*") | ||
endif() | ||
|
||
find_package(METIS REQUIRED) | ||
find_package(MPI REQUIRED COMPONENTS C Fortran) | ||
find_package(LAPACK REQUIRED) | ||
find_package(SCALAPACK REQUIRED) | ||
find_package(MUMPS REQUIRED COMPONENTS METIS) | ||
find_package(MUMPS CONFIG REQUIRED) | ||
|
||
function(precision_ex a) | ||
add_executable(${a}_metis ${a}_metis.f90) | ||
target_link_libraries(${a}_metis PRIVATE MUMPS::MUMPS METIS::METIS) | ||
target_link_libraries(${a}_metis PRIVATE MUMPS::MUMPS) | ||
add_test(NAME ${a}_metis COMMAND ${a}_metis) | ||
endfunction() | ||
|
||
if(MUMPS_d_FOUND) | ||
precision_ex("d") | ||
endif() | ||
|
||
file(GENERATE OUTPUT .gitignore CONTENT "*") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters