Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-common
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Core Modules
dune-common
Commits
49f4f384
Commit
49f4f384
authored
1 year ago
by
Simon Praetorius
Browse files
Options
Downloads
Patches
Plain Diff
Hanel optional dependency SuiteSparse by directly passing HAVE_xxx flags
parent
6b70be95
No related branches found
No related tags found
1 merge request
!1294
Handle optional dependency SuiteSparse by directly passing HAVE_xxx flags
Pipeline
#66009
passed with warnings
1 year ago
Stage: .pre
Stage: test
Stage: downstream
Pipeline: Dune Nightly Test
#66010
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
cmake/modules/AddSuiteSparseFlags.cmake
+9
-2
9 additions, 2 deletions
cmake/modules/AddSuiteSparseFlags.cmake
cmake/modules/FindSuiteSparse.cmake
+6
-0
6 additions, 0 deletions
cmake/modules/FindSuiteSparse.cmake
config.h.cmake
+3
-42
3 additions, 42 deletions
config.h.cmake
with
18 additions
and
44 deletions
cmake/modules/AddSuiteSparseFlags.cmake
+
9
−
2
View file @
49f4f384
...
...
@@ -20,9 +20,14 @@ set(HAVE_UMFPACK ${SuiteSparse_UMFPACK_FOUND})
# register all SuiteSparse related flags
if
(
SuiteSparse_FOUND
)
set
(
HAVE_SUITESPARSE_FLAGS
)
foreach
(
_component
${
SuiteSparse_FOUND_COMPONENTS
}
)
list
(
APPEND HAVE_SUITESPARSE_FLAGS
"HAVE_SUITESPARSE_
${
_component
}
=1"
)
endforeach
(
_component
)
dune_register_package_flags
(
COMPILE_DEFINITIONS
"ENABL
E_SUITESPARSE
=1"
COMPILE_DEFINITIONS
${
HAV
E_SUITESPARSE
_FLAGS
}
LIBRARIES SuiteSparse::SuiteSparse
)
unset
(
HAVE_SUITESPARSE_FLAGS
)
endif
()
# Provide function to set target properties for linking to SuiteSparse
...
...
@@ -30,7 +35,9 @@ function(add_dune_suitesparse_flags _targets)
if
(
SuiteSparse_FOUND
)
foreach
(
_target
${
_targets
}
)
target_link_libraries
(
${
_target
}
PUBLIC SuiteSparse::SuiteSparse
)
target_compile_definitions
(
${
_target
}
PUBLIC ENABLE_SUITESPARSE=1
)
foreach
(
_component
${
SuiteSparse_FOUND_COMPONENTS
}
)
target_compile_definitions
(
${
_target
}
PUBLIC HAVE_SUITESPARSE_
${
_component
}
=1
)
endforeach
(
_component
)
endforeach
(
_target
)
endif
()
endfunction
(
add_dune_suitesparse_flags
)
This diff is collapsed.
Click to expand it.
cmake/modules/FindSuiteSparse.cmake
+
6
−
0
View file @
49f4f384
...
...
@@ -216,6 +216,9 @@ find_package_handle_standard_args("SuiteSparse"
HANDLE_COMPONENTS
)
# list to indicate which components are found
set
(
SuiteSparse_FOUND_COMPONENTS
)
# if both headers and library for all required components are found,
# then create imported targets for all components
if
(
SuiteSparse_FOUND
)
...
...
@@ -241,6 +244,9 @@ if(SuiteSparse_FOUND)
foreach
(
_component
${
SUITESPARSE_COMPONENTS
}
)
if
(
TARGET SuiteSparse::
${
_component
}
)
# add component in the list of found components
list
(
APPEND SuiteSparse_FOUND_COMPONENTS
${
_component
}
)
# Link required dependencies
foreach
(
_dependency
${
SUITESPARSE_
${
_component
}
_REQUIRED_DEPENDENCIES
}
)
target_link_libraries
(
SuiteSparse::
${
_component
}
...
...
This diff is collapsed.
Click to expand it.
config.h.cmake
+
3
−
42
View file @
49f4f384
...
...
@@ -95,48 +95,9 @@
/* old feature support macros which were tested until 2.9, kept around for one more release */
#define DUNE_HAVE_CXX_EXPERIMENTAL_MAKE_ARRAY 0
/* Define to ENABLE_UMFPACK if the UMFPack library is available */
#cmakedefine HAVE_UMFPACK ENABLE_SUITESPARSE
/* Define to ENABLE_SUITESPARSE if the SuiteSparse library is available */
#cmakedefine HAVE_SUITESPARSE ENABLE_SUITESPARSE
/* Define to ENABLE_SUITESPARSE if the SuiteSparse's AMD library is available */
#cmakedefine HAVE_SUITESPARSE_AMD ENABLE_SUITESPARSE
/* Define to ENABLE_SUITESPARSE if the SuiteSparse's BTF library is available */
#cmakedefine HAVE_SUITESPARSE_BTF ENABLE_SUITESPARSE
/* Define to ENABLE_SUITESPARSE if the SuiteSparse's CAMD library is available */
#cmakedefine HAVE_SUITESPARSE_CAMD ENABLE_SUITESPARSE
/* Define to ENABLE_SUITESPARSE if the SuiteSparse's CCOLAMD library is available */
#cmakedefine HAVE_SUITESPARSE_CCOLAMD ENABLE_SUITESPARSE
/* Define to ENABLE_SUITESPARSE if the SuiteSparse's CHOLMOD library is available */
#cmakedefine HAVE_SUITESPARSE_CHOLMOD ENABLE_SUITESPARSE
/* Define to ENABLE_SUITESPARSE if the SuiteSparse's COLAMD library is available */
#cmakedefine HAVE_SUITESPARSE_COLAMD ENABLE_SUITESPARSE
/* Define to ENABLE_SUITESPARSE if the SuiteSparse's CXSPARSE library is available */
#cmakedefine HAVE_SUITESPARSE_CXSPARSE ENABLE_SUITESPARSE
/* Define to ENABLE_SUITESPARSE if the SuiteSparse's KLU library is available */
#cmakedefine HAVE_SUITESPARSE_KLU ENABLE_SUITESPARSE
/* Define to ENABLE_SUITESPARSE if the SuiteSparse's LDL library is available */
#cmakedefine HAVE_SUITESPARSE_LDL ENABLE_SUITESPARSE
/* Define to ENABLE_SUITESPARSE if the SuiteSparse's RBIO library is available */
#cmakedefine HAVE_SUITESPARSE_RBIO ENABLE_SUITESPARSE
/* Define to ENABLE_SUITESPARSE if the SuiteSparse's SPQR library is available
and if it's version is at least 4.3 */
#cmakedefine HAVE_SUITESPARSE_SPQR ENABLE_SUITESPARSE
/* Define to ENABLE_SUITESPARSE if the SuiteSparse's UMFPACK library is available */
#cmakedefine HAVE_SUITESPARSE_UMFPACK ENABLE_SUITESPARSE
/* Define to ENABLE_UMFPACK if the UMFPack library is available. */
/// \deprecated Use HAVE_SUITESPARSE_UMFPACK instead
#define HAVE_UMFPACK HAVE_SUITESPARSE_UMFPACK
/* Define to 1 if METIS is available */
#cmakedefine HAVE_METIS ENABLE_METIS
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment