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
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
Timo Koch
dune-common
Commits
28c81740
Commit
28c81740
authored
9 years ago
by
Christoph Grüninger
Browse files
Options
Downloads
Patches
Plain Diff
[SuiteSparse] Never set *_FOUND directly, use HANDLE_COMPONENT.
The naming scheme is kind of broken.
parent
a88ed89d
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cmake/modules/FindSuiteSparse.cmake
+9
-5
9 additions, 5 deletions
cmake/modules/FindSuiteSparse.cmake
cmake/modules/FindUMFPack.cmake
+1
-2
1 addition, 2 deletions
cmake/modules/FindUMFPack.cmake
with
10 additions
and
7 deletions
cmake/modules/FindSuiteSparse.cmake
+
9
−
5
View file @
28c81740
...
...
@@ -12,7 +12,7 @@
#
# Sets the following result variables:
#
# S
UITESPARSE
_FOUND Whether SuiteSparse was found and usable in the desired setting
# S
uiteSparse
_FOUND Whether SuiteSparse was found and usable in the desired setting
# SUITESPARSE_INCLUDE_DIRS Path to the SuiteSparse include dirs
# SUITESPARSE_LIBRARIES Name of the SuiteSparse libraries
# SUITESPARSE_<COMPONENT>_FOUND Whether <COMPONENT> was found as part of SuiteSparse
...
...
@@ -151,6 +151,8 @@ set(SUITESPARSE_FOUND TRUE)
foreach
(
modname
${
SUITESPARSE_COMPONENTS
}
)
dune_module_to_uppercase
(
MODNAME
${
modname
}
)
set
(
SUITESPARSE_
${
MODNAME
}
_FOUND TRUE
)
# variable used for component handling
set
(
SuiteSparse_
${
modname
}
_FOUND TRUE
)
if
(
${
MODNAME
}
_LIBRARY AND
${
MODNAME
}
_INCLUDE_DIR
)
list
(
APPEND SUITESPARSE_INCLUDE_DIR
"
${${
MODNAME
}
_INCLUDE_DIR
}
"
)
list
(
APPEND SUITESPARSE_LIBRARY
"
${${
MODNAME
}
_LIBRARY
}
"
)
...
...
@@ -161,6 +163,7 @@ foreach(modname ${SUITESPARSE_COMPONENTS})
set
(
HAVE_SUITESPARSE_
${
MODNAME
}
1
)
mark_as_advanced
(
HAVE_SUITESPARSE_
${
MODNAME
}
)
mark_as_advanced
(
SUITESPARSE_
${
MODNAME
}
_FOUND
)
mark_as_advanced
(
SuiteSparse_
${
modname
}
_FOUND
)
endforeach
()
list
(
APPEND SUITESPARSE_LIBRARY
${
SUITESPARSE_CONFIG_LIB
}
)
...
...
@@ -181,15 +184,16 @@ endif()
include
(
FindPackageHandleStandardArgs
)
find_package_handle_standard_args
(
"SuiteSparse"
DEFAULT_MSG
REQUIRED_VARS
SUITESPARSE_INCLUDE_DIR
SUITESPARSE_LIBRARY
HANDLE_COMPONENTS
)
mark_as_advanced
(
SUITESPARSE_INCLUDE_DIR SUITESPARSE_LIBRARY
)
# if both headers and library are found, store results
if
(
S
UITESPARSE
_FOUND
)
if
(
S
uiteSparse
_FOUND
)
set
(
SUITESPARSE_LIBRARIES
${
SUITESPARSE_LIBRARY
}
)
set
(
SUITESPARSE_INCLUDE_DIRS
${
SUITESPARSE_INCLUDE_DIR
}
)
# log result
...
...
@@ -214,10 +218,10 @@ else()
endif
()
#set HAVE_SUITESPARSE for config.h
set
(
HAVE_SUITESPARSE
${
S
UITESPARSE
_FOUND
}
)
set
(
HAVE_SUITESPARSE
${
S
uiteSparse
_FOUND
}
)
# register all SuiteSparse related flags
if
(
S
UITESPARSE
_FOUND
)
if
(
S
uiteSparse
_FOUND
)
dune_register_package_flags
(
COMPILE_DEFINITIONS
"ENABLE_SUITESPARSE=1"
LIBRARIES
"
${
SUITESPARSE_LIBRARIES
}
"
...
...
This diff is collapsed.
Click to expand it.
cmake/modules/FindUMFPack.cmake
+
1
−
2
View file @
28c81740
...
...
@@ -29,8 +29,7 @@
include
(
FindSuiteSparse
)
find_package
(
SuiteSparse COMPONENTS umfpack
)
if
(
SUITESPARSE_FOUND
)
set
(
UMFPACK_FOUND TRUE
)
if
(
SuiteSparse_umfpack_FOUND
)
set
(
UMFPACK_INCLUDE_DIR
${
SUITESPARSE_INCLUDE_DIR
}
)
set
(
UMFPACK_LIBRARY
${
SUITESPARSE_LIBRARY
}
)
endif
()
...
...
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