From a765f60b9989dc15eebd4d5b195ae2334b8a024a Mon Sep 17 00:00:00 2001 From: "Jose E. Roman" Date: Thu, 20 Oct 2022 11:25:53 +0200 Subject: [PATCH 1/2] cmake: include LAPACKE subdir only if it was selected --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c0bc6f6892..18e0a81354 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -444,7 +444,9 @@ endif() set(LAPACK_INSTALL_EXPORT_NAME ${LAPACK_INSTALL_EXPORT_NAME_CACHE}) unset(LAPACK_INSTALL_EXPORT_NAME_CACHE) -add_subdirectory(LAPACKE) +if(LAPACKE) + add_subdirectory(LAPACKE) +endif() #------------------------------------- From 1c163c83fe41b4be415ef5aed24d8dafbfd8899d Mon Sep 17 00:00:00 2001 From: "Jose E. Roman" Date: Sat, 1 Apr 2023 11:07:38 +0200 Subject: [PATCH 2/2] cmake: allow setting a prefix for the library names --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 18e0a81354..e9a6ff770e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,10 @@ set( ${LAPACK_MAJOR_VERSION}.${LAPACK_MINOR_VERSION}.${LAPACK_PATCH_VERSION} ) +# Allow setting a prefix for the library names +set(CMAKE_STATIC_LIBRARY_PREFIX "lib${LIBRARY_PREFIX}") +set(CMAKE_SHARED_LIBRARY_PREFIX "lib${LIBRARY_PREFIX}") + # Add the CMake directory for custom CMake modules set(CMAKE_MODULE_PATH "${LAPACK_SOURCE_DIR}/CMAKE" ${CMAKE_MODULE_PATH})