Skip to content

Commit

Permalink
Merge pull request #4148 from lisajulia/fix/metis-support
Browse files Browse the repository at this point in the history
Correct FindMETIS.cmake - only link Scotch if IS_SCOTCH_METIS_HEADER …
  • Loading branch information
atgeirr authored Jul 25, 2024
2 parents ee4f1b8 + 2598a54 commit 974bd79
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cmake/Modules/FindMETIS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,14 @@ if (METIS_INCLUDE_DIRS OR METIS_LIBRARY)
INTERFACE_COMPILE_DEFINITIONS
SCOTCH_METIS_VERSION=${METIS_API_VERSION})
endif()
if(Scotch_FOUND)
if(IS_SCOTCH_METIS_HEADER AND Scotch_FOUND)
set_property(TARGET METIS::METIS APPEND PROPERTY
INTERFACE_INCLUDE_DIRECTORIES ${SCOTCH_INCLUDE_DIRS})
set_property(TARGET METIS::METIS APPEND PROPERTY
INTERFACE_LINK_LIBRARIES ${SCOTCH_LIBRARIES})
else()
message(FATAL_ERROR "Scotch library not found")
endif()
if(IS_SCOTCH_METIS_HEADER AND NOT Scotch_FOUND)
message(FATAL_ERROR "ScotchMETIS is installed but the Scotch library is not found!")
endif()
# Force our build system to use the target
set(METIS_LIBRARIES METIS::METIS)
Expand Down

0 comments on commit 974bd79

Please sign in to comment.