-
Notifications
You must be signed in to change notification settings - Fork 6
Follow standard CMake layout #214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
7eb9e54
Use directory agnostic imports
EmilyBourne ed53411
Move package searches to root. InputFunctions only needs to be linked…
EmilyBourne ec909eb
Link includes cleanly
EmilyBourne 1351a29
All tests use input
EmilyBourne 18a3cbe
Set C++ standard globally
EmilyBourne 4e46726
Move LIKWID and MUMPS target definition to cmake/FindX.cmake files
EmilyBourne 08d6ffb
Try for a local version of GTest
EmilyBourne ed80423
Prefer project paths
EmilyBourne bdd3cd2
Add an install target
EmilyBourne 7d43a70
Add GMGPolarTargets to ensure we can do find_package(GMGPolar)
EmilyBourne a01d03e
Use different include paths for local build vs installed library
EmilyBourne 7392ea6
Clang format
EmilyBourne 7a1850f
Merge remote-tracking branch 'GMGPolar/main' into ebourne_cleanup_cmake
EmilyBourne 6e94e02
Fix merge
EmilyBourne 2106436
Merge remote-tracking branch 'GMGPolar/main' into ebourne_cleanup_cmake
EmilyBourne edaf7d4
Create GMGPolarInterface to hold all CLI/testing interface objects
EmilyBourne adaca6d
MUMPS dependencies
EmilyBourne 4ee7dbb
Add target aliases
EmilyBourne c2da216
Can't export aliases
EmilyBourne 3678f5c
Only C++ component required
EmilyBourne 0bacedc
Tests should not be its own project
EmilyBourne 063b52c
Add QUIET to find_package(GTest)
EmilyBourne f33f81d
Version already set
EmilyBourne b101c71
Duplicate C++ version specification
EmilyBourne e1ca3ba
Enable Fortran instead of choosing project languages based on USE_MUMPS
EmilyBourne 0ba4a9e
Clear duplicate project declaration
EmilyBourne 6971888
Review ebourne cleanup cmake (#234)
tpadioleau 924e13f
Merge branch 'main' into ebourne_cleanup_cmake
EmilyBourne 626bd01
Merge branch 'main' into ebourne_cleanup_cmake
EmilyBourne 6a9c5da
Fix merge
EmilyBourne 3c70848
Merge remote-tracking branch 'GMGPolar/main' into ebourne_cleanup_cmake
EmilyBourne b55dc96
Use cmake path
EmilyBourne 53168fe
Fix merge
EmilyBourne 195f0eb
Merge remote-tracking branch 'GMGPolar/main' into ebourne_cleanup_cmake
EmilyBourne 3846939
Add comment
EmilyBourne File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
|
|
||
| if(DEFINED ENV{LIKWID_DIR} AND NOT LIKWID_DIR) | ||
| set(LIKWID_DIR "$ENV{LIKWID_DIR}" CACHE PATH "LIKWID installation directory") | ||
| endif() | ||
|
|
||
| find_package(PkgConfig QUIET) | ||
| if(PKG_CONFIG_FOUND) | ||
| pkg_check_modules(LIKWID_PC QUIET likwid) | ||
| endif() | ||
|
|
||
| find_path(LIKWID_INCLUDE_DIR | ||
| NAMES likwid.h | ||
| HINTS ${LIKWID_DIR}/include ${LIKWID_PC_INCLUDE_DIRS} | ||
| ) | ||
|
|
||
| find_library(LIKWID_LIBRARY | ||
| NAMES likwid | ||
| HINTS ${LIKWID_DIR}/lib ${LIKWID_DIR}/lib64 ${LIKWID_PC_LIBRARY_DIRS} | ||
| ) | ||
|
|
||
| include(FindPackageHandleStandardArgs) | ||
| find_package_handle_standard_args(LIKWID | ||
| REQUIRED_VARS LIKWID_INCLUDE_DIR LIKWID_LIBRARY | ||
| ) | ||
|
|
||
| if(LIKWID_FOUND AND NOT TARGET LIKWID::LIKWID) | ||
| add_library(LIKWID::LIKWID INTERFACE IMPORTED) | ||
| set_target_properties(LIKWID::LIKWID PROPERTIES | ||
| INTERFACE_INCLUDE_DIRECTORIES "${LIKWID_INCLUDE_DIR}" | ||
| INTERFACE_LINK_LIBRARIES "${LIKWID_LIBRARY}" | ||
| INTERFACE_COMPILE_DEFINITIONS "LIKWID_PERFMON" | ||
| ) | ||
| endif() |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
|
|
||
| # Stage 1: prefer an installed MUMPS CMake config (supports COMPONENTS properly) | ||
| find_package(MUMPS CONFIG QUIET COMPONENTS ${MUMPS_FIND_COMPONENTS}) | ||
| if(MUMPS_FOUND) | ||
| return() | ||
| endif() | ||
|
|
||
| # Stage 2: manual discovery via MUMPS_DIR hint | ||
| if(DEFINED ENV{MUMPS_DIR} AND NOT MUMPS_DIR) | ||
| set(MUMPS_DIR "$ENV{MUMPS_DIR}" CACHE PATH "MUMPS installation directory") | ||
| endif() | ||
|
|
||
| find_path(MUMPS_INCLUDE_DIR | ||
| NAMES dmumps_c.h | ||
| HINTS ${MUMPS_DIR}/include | ||
| ) | ||
|
|
||
| foreach(_lib dmumps smumps mumps_common) | ||
| find_library(MUMPS_${_lib}_LIBRARY | ||
| NAMES ${_lib} | ||
| HINTS ${MUMPS_DIR}/lib ${MUMPS_DIR}/lib64 | ||
| ) | ||
| list(APPEND _MUMPS_REQUIRED_VARS MUMPS_${_lib}_LIBRARY) | ||
| endforeach() | ||
|
|
||
| # mpiseq is the sequential MPI stub — only present in sequential builds | ||
| find_library(MUMPS_mpiseq_LIBRARY | ||
| NAMES mpiseq | ||
| HINTS ${MUMPS_DIR}/lib ${MUMPS_DIR}/lib64 | ||
| ${MUMPS_DIR}/libseq ${MUMPS_DIR}/lib/SEQ | ||
| ) | ||
|
|
||
| include(FindPackageHandleStandardArgs) | ||
| find_package_handle_standard_args(MUMPS | ||
| REQUIRED_VARS MUMPS_INCLUDE_DIR ${_MUMPS_REQUIRED_VARS} | ||
| ) | ||
|
|
||
| if(MUMPS_FOUND AND NOT TARGET MUMPS::MUMPS) | ||
| find_package(Metis REQUIRED) | ||
|
|
||
| set(_mumps_libs | ||
| ${MUMPS_dmumps_LIBRARY} | ||
| ${MUMPS_smumps_LIBRARY} | ||
| ${MUMPS_mumps_common_LIBRARY} | ||
| metis::metis | ||
| ) | ||
| if(MUMPS_mpiseq_LIBRARY) | ||
| list(APPEND _mumps_libs ${MUMPS_mpiseq_LIBRARY}) | ||
| endif() | ||
|
|
||
| add_library(MUMPS::MUMPS INTERFACE IMPORTED) | ||
| set_target_properties(MUMPS::MUMPS PROPERTIES | ||
| INTERFACE_INCLUDE_DIRECTORIES "${MUMPS_INCLUDE_DIR}" | ||
| INTERFACE_LINK_LIBRARIES "${_mumps_libs}" | ||
| ) | ||
| endif() |
|
EmilyBourne marked this conversation as resolved.
|
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
|
|
||
| if(DEFINED ENV{METIS_DIR} AND NOT METIS_DIR) | ||
| set(METIS_DIR "$ENV{METIS_DIR}" CACHE PATH "METIS installation directory") | ||
| endif() | ||
|
|
||
| find_path(METIS_INCLUDE_DIR | ||
| NAMES metis.h | ||
| HINTS ${METIS_DIR}/include | ||
| ) | ||
|
|
||
| find_library(METIS_LIBRARY | ||
| NAMES metis | ||
| HINTS ${METIS_DIR}/lib ${METIS_DIR}/lib64 | ||
| ) | ||
|
|
||
| include(FindPackageHandleStandardArgs) | ||
| find_package_handle_standard_args(Metis | ||
| REQUIRED_VARS METIS_INCLUDE_DIR METIS_LIBRARY | ||
| ) | ||
|
|
||
| if(Metis_FOUND AND NOT TARGET metis::metis) | ||
| add_library(metis::metis INTERFACE IMPORTED) | ||
| set_target_properties(metis::metis PROPERTIES | ||
| INTERFACE_INCLUDE_DIRECTORIES "${METIS_INCLUDE_DIR}" | ||
| INTERFACE_LINK_LIBRARIES "${METIS_LIBRARY}" | ||
| ) | ||
| endif() |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| @PACKAGE_INIT@ | ||
|
|
||
| list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}") | ||
|
|
||
| include(CMakeFindDependencyMacro) | ||
|
|
||
| find_dependency(OpenMP COMPONENTS CXX) | ||
| find_dependency(Kokkos) | ||
|
|
||
| if(@GMGPOLAR_USE_MUMPS@) | ||
| find_dependency(MUMPS COMPONENTS OpenMP METIS) | ||
| endif() | ||
|
|
||
| if(@GMGPOLAR_USE_LIKWID@) | ||
| find_dependency(LIKWID) | ||
| endif() | ||
|
|
||
| include("${CMAKE_CURRENT_LIST_DIR}/GMGPolarTargets.cmake") |
This file contains hidden or 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
This file contains hidden or 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
4 changes: 2 additions & 2 deletions
4
include/ExtrapolatedSmoother/ExtrapolatedSmootherGive/buildInnerBoundaryAsc.inl
This file contains hidden or 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
4 changes: 2 additions & 2 deletions
4
include/ExtrapolatedSmoother/ExtrapolatedSmootherGive/buildTridiagonalAsc.inl
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.