Skip to content

Commit

Permalink
- allow to pickup mkl from mkl-static dir
Browse files Browse the repository at this point in the history
  • Loading branch information
fbergmann committed Oct 24, 2024
1 parent caf24d4 commit 22acc62
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions CMakeModules/FindCLAPACK.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2019 - 2022 by Pedro Mendes, Rector and Visitors of the
# Copyright (C) 2019 - 2024 by Pedro Mendes, Rector and Visitors of the
# University of Virginia, University of Heidelberg, and University
# of Connecticut School of Medicine.
# All rights reserved.
Expand Down Expand Up @@ -112,10 +112,14 @@ if (NOT LAPACK_FOUND)
set(BLA_VENDOR "Intel (MKL)")

if (UNIX)
if (COPASI_BUILD_TYPE EQUAL "32bit")
if ((COPASI_BUILD_TYPE EQUAL "32bit") AND EXISTS $ENV{MKLROOT}/lib/ia32)
set(LAPACK_LIBRARIES "-Wl,--start-group $ENV{MKLROOT}/lib/ia32/libmkl_intel.a $ENV{MKLROOT}/lib/ia32/libmkl_core.a $ENV{MKLROOT}/lib/ia32/libmkl_sequential.a -Wl,--end-group -lpthread -lm -ldl")
elseif (COPASI_BUILD_TYPE EQUAL "64bit")
elseif (COPASI_BUILD_TYPE EQUAL "64bit" AND EXISTS $ENV{MKLROOT}/lib/intel64)
set(LAPACK_LIBRARIES "-Wl,--start-group $ENV{MKLROOT}/lib/intel64/libmkl_intel_lp64.a $ENV{MKLROOT}/lib/intel64/libmkl_core.a $ENV{MKLROOT}/lib/intel64/libmkl_sequential.a -Wl,--end-group -lpthread -lm -ldl")
elseif(EXISTS "$ENV{MKLROOT}/lib" AND EXISTS "$ENV{MKLROOT}/lib/libmkl_intel_lp64.a")
set(LAPACK_LIBRARIES "-Wl,--start-group $ENV{MKLROOT}/lib/libmkl_intel_lp64.a $ENV{MKLROOT}/lib/libmkl_core.a $ENV{MKLROOT}/lib/libmkl_sequential.a -Wl,--end-group -lpthread -lm -ldl")
elseif(EXISTS $ENV{MKLROOT}/lib AND EXISTS $ENV{MKLROOT}/lib/libmkl_intel.a)
set(LAPACK_LIBRARIES "-Wl,--start-group $ENV{MKLROOT}/lib/libmkl_intel.a $ENV{MKLROOT}/lib/libmkl_core.a $ENV{MKLROOT}/lib/libmkl_sequential.a -Wl,--end-group -lpthread -lm -ldl")
endif ()
else ()
if (COPASI_BUILD_TYPE EQUAL "32bit")
Expand Down
2 changes: 1 addition & 1 deletion copasi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ endif(EXTRA_MOC_OPTIONS)
set(QWT_VERSION 0x0${QWT_VERSION_NUMERIC})
set(COPASI_UI_MOC_OPTIONS ${COPASI_UI_MOC_OPTIONS} -DQWT_VERSION=0x0${QWT_VERSION_NUMERIC})

if (CLAPACK_FOUND)
if (CLAPACK_FOUND AND NOT USE_MKL)
set(USE_CLAPACK 1)
elseif (USE_MKL)
set(USE_MKL 1)
Expand Down

0 comments on commit 22acc62

Please sign in to comment.