Let SuiteSparse path be specified without config mode
Use the _ROOT suffix to direct the CMake module to use a particular path to the SuiteSparse installation without also triggering config mode (by convention CMake uses Foo_DIR as the name of the variable which specifies where to look for another *project*).
This commit is contained in:
@@ -42,6 +42,17 @@ if (${SuiteSparse_DIR})
|
||||
list (INSERT SuiteSparse_SEARCH_INCS 0 "${SuiteSparse_DIR}")
|
||||
list (INSERT SuiteSparse_SEARCH_LIBS 0 "${SuiteSparse_DIR}")
|
||||
endif (${SuiteSparse_DIR})
|
||||
# CMake uses _DIR suffix as default for config-mode files; it is unlikely
|
||||
# that we are building SuiteSparse ourselves; use _ROOT suffix to specify
|
||||
# location to pre-canned binaries
|
||||
if (NOT $ENV{SuiteSparse_ROOT} STREQUAL "")
|
||||
list (INSERT SuiteSparse_SEARCH_INCS 0 "$ENV{SuiteSparse_ROOT}")
|
||||
list (INSERT SuiteSparse_SEARCH_LIBS 0 "$ENV{SuiteSparse_ROOT}")
|
||||
endif (NOT $ENV{SuiteSparse_ROOT} STREQUAL "")
|
||||
if (${SuiteSparse_ROOT})
|
||||
list (INSERT SuiteSparse_SEARCH_INCS 0 "${SuiteSparse_ROOT}")
|
||||
list (INSERT SuiteSparse_SEARCH_LIBS 0 "${SuiteSparse_ROOT}")
|
||||
endif (${SuiteSparse_ROOT})
|
||||
|
||||
# transitive closure of dependencies; after this SuiteSparse_MODULES is the
|
||||
# full list of modules that must be found to satisfy the user's link demands
|
||||
|
||||
Reference in New Issue
Block a user