summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Emmenlauer <mario@emmenlauer.de>2020-01-31 10:15:11 (GMT)
committerMario Emmenlauer <mario@emmenlauer.de>2020-01-31 10:32:46 (GMT)
commitfe86dc43fec40e96ee6670a3a62a25da6c2667a5 (patch)
tree4fdc2e498cd43579e05df128c61f3c2b02a5c6ae
parentd70b71c14f6b631ee4570c530b7a48f2ca72de54 (diff)
downloadCMake-fe86dc43fec40e96ee6670a3a62a25da6c2667a5.zip
CMake-fe86dc43fec40e96ee6670a3a62a25da6c2667a5.tar.gz
CMake-fe86dc43fec40e96ee6670a3a62a25da6c2667a5.tar.bz2
Find{BLAS,LAPACK}: Fixed an incorrect use of a macro argument
-rw-r--r--Modules/FindBLAS.cmake11
-rw-r--r--Modules/FindLAPACK.cmake11
2 files changed, 12 insertions, 10 deletions
diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake
index ed11364..9830395 100644
--- a/Modules/FindBLAS.cmake
+++ b/Modules/FindBLAS.cmake
@@ -161,14 +161,15 @@ macro(CHECK_BLAS_LIBRARIES LIBRARIES _prefix _name _flags _list _threadlibs _add
set(${LIBRARIES})
set(_combined_name)
+ set(_extaddlibdir "${_addlibdir}")
if(WIN32)
- list(APPEND _addlibdir ENV LIB)
+ list(APPEND _extaddlibdir ENV LIB)
elseif(APPLE)
- list(APPEND _addlibdir ENV DYLD_LIBRARY_PATH)
+ list(APPEND _extaddlibdir ENV DYLD_LIBRARY_PATH)
else()
- list(APPEND _addlibdir ENV LD_LIBRARY_PATH)
+ list(APPEND _extaddlibdir ENV LD_LIBRARY_PATH)
endif()
- list(APPEND _addlibdir "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
+ list(APPEND _extaddlibdir "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
foreach(_library ${_list})
if(_library MATCHES "^-Wl,--(start|end)-group$")
@@ -182,7 +183,7 @@ macro(CHECK_BLAS_LIBRARIES LIBRARIES _prefix _name _flags _list _threadlibs _add
if(_libraries_work)
find_library(${_prefix}_${_library}_LIBRARY
NAMES ${_library}
- PATHS ${_addlibdir}
+ PATHS ${_extaddlibdir}
PATH_SUFFIXES ${_subdirs}
)
#message("DEBUG: find_library(${_library}) got ${${_prefix}_${_library}_LIBRARY}")
diff --git a/Modules/FindLAPACK.cmake b/Modules/FindLAPACK.cmake
index 8ade0b1..54b4866 100644
--- a/Modules/FindLAPACK.cmake
+++ b/Modules/FindLAPACK.cmake
@@ -131,14 +131,15 @@ macro(CHECK_LAPACK_LIBRARIES LIBRARIES _prefix _name _flags _list _threadlibs _a
set(${LIBRARIES})
set(_combined_name)
+ set(_extaddlibdir "${_addlibdir}")
if(WIN32)
- list(APPEND _addlibdir ENV LIB)
+ list(APPEND _extaddlibdir ENV LIB)
elseif(APPLE)
- list(APPEND _addlibdir ENV DYLD_LIBRARY_PATH)
+ list(APPEND _extaddlibdir ENV DYLD_LIBRARY_PATH)
else()
- list(APPEND _addlibdir ENV LD_LIBRARY_PATH)
+ list(APPEND _extaddlibdir ENV LD_LIBRARY_PATH)
endif()
- list(APPEND _addlibdir "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
+ list(APPEND _extaddlibdir "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
foreach(_library ${_list})
if(_library MATCHES "^-Wl,--(start|end)-group$")
@@ -149,7 +150,7 @@ macro(CHECK_LAPACK_LIBRARIES LIBRARIES _prefix _name _flags _list _threadlibs _a
if(_libraries_work)
find_library(${_prefix}_${_library}_LIBRARY
NAMES ${_library}
- PATHS ${_addlibdir}
+ PATHS ${_extaddlibdir}
PATH_SUFFIXES ${_subdirs}
)
#message("DEBUG: find_library(${_library}) got ${${_prefix}_${_library}_LIBRARY}")