Skip to content

Commit

Permalink
Merge pull request #483 from mmuetzel/example
Browse files Browse the repository at this point in the history
Make example less dependent on layout of SuiteSparse source tree
  • Loading branch information
DrTimothyAldenDavis authored Nov 1, 2023
2 parents 04f494d + 7a375ae commit b688ef1
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 329 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-arch-emu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ jobs:
cd ${GITHUB_WORKSPACE}/Example/build
printf "::group::\033[0;32m==>\033[0m Configuring example\n"
cmake \
-DCMAKE_PREFIX_PATH="${GITHUB_WORKSPACE}/lib/cmake" \
-DBLA_VENDOR="OpenBLAS" \
..
echo "::endgroup::"
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ jobs:
cd ${GITHUB_WORKSPACE}/Example/build
printf "::group::\033[0;32m==>\033[0m Configuring example\n"
cmake \
-DCMAKE_PREFIX_PATH="${GITHUB_WORKSPACE}/lib/cmake" \
-DBLA_VENDOR="OpenBLAS" \
${{ matrix.cuda-cmake-flags }} \
..
Expand Down Expand Up @@ -300,7 +301,7 @@ jobs:
cd ${GITHUB_WORKSPACE}/Example/build
printf "::group::\033[0;32m==>\033[0m Configuring example\n"
cmake \
-DCMAKE_PREFIX_PATH="/usr/local/opt/lapack;/usr/local/opt/openblas;/usr/local/opt/libomp" \
-DCMAKE_PREFIX_PATH="${GITHUB_WORKSPACE}/lib/cmake;/usr/local/opt/lapack;/usr/local/opt/openblas;/usr/local/opt/libomp" \
..
echo "::endgroup::"
printf "::group::\033[0;32m==>\033[0m Building example\n"
Expand Down Expand Up @@ -457,7 +458,7 @@ jobs:
cd ${GITHUB_WORKSPACE}/Example/build
printf "::group::\033[0;32m==>\033[0m Configuring example\n"
cmake \
-DCMAKE_MODULE_PATH="${MINGW_PREFIX}/lib/cmake/SuiteSparse" \
-DCMAKE_PREFIX_PATH="${GITHUB_WORKSPACE}/lib/cmake" \
..
echo "::endgroup::"
printf "::group::\033[0;32m==>\033[0m Building example\n"
Expand Down Expand Up @@ -651,7 +652,7 @@ jobs:
cd ${GITHUB_WORKSPACE}/Example/build
printf "::group::\033[0;32m==>\033[0m Configuring example\n"
cmake \
-DCMAKE_PREFIX_PATH="C:/Miniconda/envs/test/Library;${GITHUB_WORKSPACE}/dependencies" \
-DCMAKE_PREFIX_PATH="${GITHUB_WORKSPACE}/lib/cmake;C:/Miniconda/envs/test/Library;${GITHUB_WORKSPACE}/dependencies" \
-DBLA_VENDOR="All" \
${{ matrix.openmp-cmake-flags }} \
..
Expand Down
17 changes: 6 additions & 11 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 @@ -39,15 +43,6 @@ set ( CMAKE_MACOSX_RPATH TRUE )
enable_language ( C CXX )
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 )

#-------------------------------------------------------------------------------
# define my project
#-------------------------------------------------------------------------------
Expand Down Expand Up @@ -82,8 +77,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
164 changes: 0 additions & 164 deletions Example/cmake_modules/FindGMP.cmake

This file was deleted.

151 changes: 0 additions & 151 deletions Example/cmake_modules/FindMPFR.cmake

This file was deleted.

0 comments on commit b688ef1

Please sign in to comment.