early-access version 2853

This commit is contained in:
pineappleEA
2022-07-23 03:01:36 +02:00
parent 1f2b5081b5
commit 1f111bb69c
8955 changed files with 418777 additions and 999 deletions

View File

@@ -0,0 +1,60 @@
diff --git a/cmake_aux/Modules/ARMA_FindARPACK.cmake b/cmake_aux/Modules/ARMA_FindARPACK.cmake
index 1a709ad..3029c25 100644
--- a/cmake_aux/Modules/ARMA_FindARPACK.cmake
+++ b/cmake_aux/Modules/ARMA_FindARPACK.cmake
@@ -4,6 +4,10 @@
# ARPACK_FOUND - system has ARPACK
# ARPACK_LIBRARY - Link this to use ARPACK
+if(CMAKE_DISABLE_FIND_PACKAGE_ARPACK)
+ set(ARPACK_FOUND NO)
+ return()
+endif()
find_library(ARPACK_LIBRARY
NAMES arpack
diff --git a/cmake_aux/Modules/ARMA_FindATLAS.cmake b/cmake_aux/Modules/ARMA_FindATLAS.cmake
index 491a361..e40a0ff 100644
--- a/cmake_aux/Modules/ARMA_FindATLAS.cmake
+++ b/cmake_aux/Modules/ARMA_FindATLAS.cmake
@@ -1,3 +1,8 @@
+if(CMAKE_DISABLE_FIND_PACKAGE_ATLAS)
+ set(ATLAS_FOUND NO)
+ return()
+endif()
+
find_path(ATLAS_CBLAS_INCLUDE_DIR
NAMES cblas.h
PATHS /usr/include/atlas/ /usr/include/ /usr/local/include/atlas/ /usr/local/include/
diff --git a/cmake_aux/Modules/ARMA_FindMKL.cmake b/cmake_aux/Modules/ARMA_FindMKL.cmake
index 0fd5b06..d6bcd49 100644
--- a/cmake_aux/Modules/ARMA_FindMKL.cmake
+++ b/cmake_aux/Modules/ARMA_FindMKL.cmake
@@ -6,6 +6,11 @@
## the link below explains why we're linking only with mkl_rt
## https://software.intel.com/en-us/articles/a-new-linking-model-single-dynamic-library-mkl_rt-since-intel-mkl-103
+if(CMAKE_DISABLE_FIND_PACKAGE_MKL)
+ set(MKL_FOUND NO)
+ return()
+endif()
+
set(MKL_NAMES ${MKL_NAMES} mkl_rt)
#set(MKL_NAMES ${MKL_NAMES} mkl_lapack)
#set(MKL_NAMES ${MKL_NAMES} mkl_intel_thread)
diff --git a/cmake_aux/Modules/ARMA_FindSuperLU5.cmake b/cmake_aux/Modules/ARMA_FindSuperLU5.cmake
index abf046d..e496cb0 100644
--- a/cmake_aux/Modules/ARMA_FindSuperLU5.cmake
+++ b/cmake_aux/Modules/ARMA_FindSuperLU5.cmake
@@ -5,6 +5,11 @@
# SuperLU_LIBRARY - Link this to use SuperLU
# SuperLU_INCLUDE_DIR - directory of SuperLU headers
+if(CMAKE_DISABLE_FIND_PACKAGE_SuperLU)
+ set(SuperLU_FOUND OFF)
+ return()
+endif()
+
find_path(SuperLU_INCLUDE_DIR slu_ddefs.h
/usr/include/superlu/
/usr/include/SuperLU/

View File

@@ -0,0 +1,13 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ea5516e..ecd14bc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -615,7 +615,7 @@ install(EXPORT ArmadilloLibraryDepends DESTINATION
# and install it
set(ARMADILLO_INCLUDE_DIRS "${CMAKE_INSTALL_FULL_INCLUDEDIR}")
set(ARMADILLO_LIB_DIR "${CMAKE_INSTALL_FULL_LIBDIR}")
-set(ARMADILLO_CMAKE_DIR "${CMAKE_INSTALL_FULL_DATADIR}/Armadillo/CMake")
+set(ARMADILLO_CMAKE_DIR "${CMAKE_INSTALL_FULL_DATADIR}/Armadillo")
message(STATUS "Generating '${PROJECT_BINARY_DIR}/InstallFiles/ArmadilloConfig.cmake'")

View File

@@ -0,0 +1,54 @@
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_sourceforge(
OUT_SOURCE_PATH SOURCE_PATH
REPO arma
FILENAME "armadillo-10.6.2.tar.xz"
SHA512 ae04e993830ca04e7eddfaf9c40a50fb9139b10b9667412f5a18707ac73ee529b8e3a5a91337782e4e01bae61207b44f24bdd8a77c6c2404011a06006d849aba
PATCHES
remove_custom_modules.patch
fix-CMakePath.patch
add-disable-find-package.patch
)
file(REMOVE "${SOURCE_PATH}/cmake_aux/Modules/ARMA_FindBLAS.cmake")
file(REMOVE "${SOURCE_PATH}/cmake_aux/Modules/ARMA_FindLAPACK.cmake")
file(REMOVE "${SOURCE_PATH}/cmake_aux/Modules/ARMA_FindOpenBLAS.cmake")
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
DISABLE_PARALLEL_CONFIGURE
OPTIONS
-DDETECT_HDF5=false
-DCMAKE_DISABLE_FIND_PACKAGE_SuperLU=ON
-DCMAKE_DISABLE_FIND_PACKAGE_ARPACK=ON
-DCMAKE_DISABLE_FIND_PACKAGE_ATLAS=ON
-DCMAKE_DISABLE_FIND_PACKAGE_MKL=ON
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(PACKAGE_NAME Armadillo CONFIG_PATH share/Armadillo/CMake)
vcpkg_copy_pdbs()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(GLOB SHARE_CONTENT "${CURRENT_PACKAGES_DIR}/share/Armadillo")
list(LENGTH SHARE_CONTENT SHARE_LEN)
if(SHARE_LEN EQUAL 0)
# On case sensitive file system there is an extra empty directory created that should be removed
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/Armadillo")
endif()
set(filename "${CURRENT_PACKAGES_DIR}/include/armadillo_bits/config.hpp")
if(EXISTS "${filename}")
file(READ "${filename}" contents)
string(REGEX REPLACE "\n#define ARMA_AUX_LIBS [^\n]*\n" "\n" contents "${contents}")
file(WRITE "${filename}" "${contents}")
endif()
file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
vcpkg_fixup_pkgconfig()

View File

@@ -0,0 +1,23 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ab7dbed..ea5516e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -324,15 +324,15 @@ if(APPLE)
else()
include(ARMA_FindMKL)
- include(ARMA_FindOpenBLAS)
include(ARMA_FindATLAS)
- include(ARMA_FindBLAS)
- include(ARMA_FindLAPACK)
if(ALLOW_FLEXIBLAS_LINUX AND (${CMAKE_SYSTEM_NAME} MATCHES "Linux"))
include(ARMA_FindFlexiBLAS)
endif()
+ find_package(BLAS)
+ find_package(LAPACK)
+
message(STATUS " MKL_FOUND = ${MKL_FOUND}" )
message(STATUS " OpenBLAS_FOUND = ${OpenBLAS_FOUND}" )
message(STATUS " ATLAS_FOUND = ${ATLAS_FOUND}" )

4
externals/vcpkg/ports/armadillo/usage vendored Executable file
View File

@@ -0,0 +1,4 @@
The package armadillo provides CMake targets:
find_package(Armadillo CONFIG REQUIRED)
target_link_libraries(main PRIVATE ${ARMADILLO_LIBRARIES})

19
externals/vcpkg/ports/armadillo/vcpkg.json vendored Executable file
View File

@@ -0,0 +1,19 @@
{
"name": "armadillo",
"version": "10.6.2",
"port-version": 5,
"description": "Armadillo is a high quality linear algebra library (matrix maths) for the C++ language, aiming towards a good balance between speed and ease of use",
"homepage": "http://arma.sourceforge.net",
"dependencies": [
"blas",
"lapack",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}