Skip to content

Commit

Permalink
Make example less dependent on layout of SuiteSparse source tree.
Browse files Browse the repository at this point in the history
This change should make the example more useful for downstream users.
  • Loading branch information
mmuetzel committed Nov 1, 2023
1 parent 3dc1a2d commit 902201b
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions Example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
# Copyright (c) 2022-2023, Timothy A. Davis, All Rights Reserved.
# SPDX-License-Identifier: BSD-3-clause

# To build this example, add the location of the CMake config files to
# CMAKE_PREFIX_PATH if the SuiteSparse libraries aren't installed at a
# default location.

#-------------------------------------------------------------------------------
# get the version
#-------------------------------------------------------------------------------
Expand Down Expand Up @@ -41,12 +45,7 @@ include ( GNUInstallDirs )

# set the module path for all Find*.cmake files.
set ( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}
${CMAKE_SOURCE_DIR}/cmake_modules
${CMAKE_SOURCE_DIR}/../lib/cmake/SuiteSparse
${CMAKE_INSTALL_PREFIX}/lib/cmake/SuiteSparse )
# add path to cmake target files (if necessary)
set ( CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH}
${CMAKE_SOURCE_DIR}/../lib/cmake )
${CMAKE_SOURCE_DIR}/cmake_modules )

#-------------------------------------------------------------------------------
# define my project
Expand Down Expand Up @@ -82,8 +81,8 @@ find_package ( UMFPACK 6.2.2 REQUIRED )

# look for all external libaries:
find_package ( OpenMP REQUIRED )

include ( SuiteSparseBLAS )
find_package ( BLAS REQUIRED )
find_package ( LAPACK REQUIRED )

#-------------------------------------------------------------------------------
# configure files
Expand Down

0 comments on commit 902201b

Please sign in to comment.