Initial Commit
- initial default booting image
This commit is contained in:
@@ -0,0 +1,88 @@
|
||||
From f49d5c1a6b7c22be359189cd0b1e2e766bd05365 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Antonio=20S=C3=A1nchez?= <cantonios@google.com>
|
||||
Date: Sat, 5 Mar 2022 05:49:45 +0000
|
||||
Subject: [PATCH] Adds new CMake Options for controlling build components.
|
||||
|
||||
[Retrieved from:
|
||||
https://gitlab.com/libeigen/eigen/-/commit/cf82186416d04ea5df2a397d8fe09dc78d40ca65]
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
[Julien: rebased patch on 3.4.0]
|
||||
Signed-off-by: Julien Olivain <ju.o@free.fr>
|
||||
---
|
||||
CMakeLists.txt | 6 ++++++
|
||||
blas/CMakeLists.txt | 3 ++-
|
||||
lapack/CMakeLists.txt | 5 +++++
|
||||
3 files changed, 13 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index f3e69b845..74ff755f5 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -495,6 +495,9 @@ if(BUILD_TESTING)
|
||||
add_subdirectory(failtest)
|
||||
endif()
|
||||
|
||||
+include(CMakeDetermineFortranCompiler)
|
||||
+option(EIGEN_BUILD_BLAS "Toggles the building of the Eigen Blas library" ${CMAKE_Fortran_COMPILER})
|
||||
+option(EIGEN_BUILD_LAPACK "Toggles the building of the included Eigen LAPACK library" ${CMAKE_Fortran_COMPILER})
|
||||
if(EIGEN_LEAVE_TEST_IN_ALL_TARGET)
|
||||
add_subdirectory(blas)
|
||||
add_subdirectory(lapack)
|
||||
@@ -612,6 +615,8 @@ set_target_properties (eigen PROPERTIES EXPORT_NAME Eigen)
|
||||
|
||||
install (TARGETS eigen EXPORT Eigen3Targets)
|
||||
|
||||
+option(EIGEN_BUILD_CMAKE_PACKAGE "Enables the creation of EigenConfig.cmake and related files" ON)
|
||||
+if(EIGEN_BUILD_CMAKE_PACKAGE)
|
||||
configure_package_config_file (
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cmake/Eigen3Config.cmake.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/Eigen3Config.cmake
|
||||
@@ -647,6 +652,7 @@ install ( FILES ${CMAKE_CURRENT_SOURCE_DIR}/cmake/UseEigen3.cmake
|
||||
# Add uninstall target
|
||||
add_custom_target ( uninstall
|
||||
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/EigenUninstall.cmake)
|
||||
+endif()
|
||||
|
||||
if (EIGEN_SPLIT_TESTSUITE)
|
||||
ei_split_testsuite("${EIGEN_SPLIT_TESTSUITE}")
|
||||
diff --git a/blas/CMakeLists.txt b/blas/CMakeLists.txt
|
||||
index f3a94ec4a..d07090f69 100644
|
||||
--- a/blas/CMakeLists.txt
|
||||
+++ b/blas/CMakeLists.txt
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
project(EigenBlas CXX)
|
||||
|
||||
+if(EIGEN_BUILD_BLAS)
|
||||
include(CheckLanguage)
|
||||
check_language(Fortran)
|
||||
if(CMAKE_Fortran_COMPILER)
|
||||
@@ -59,4 +60,4 @@ if(BUILD_TESTING)
|
||||
endif()
|
||||
|
||||
endif()
|
||||
-
|
||||
+endif()
|
||||
diff --git a/lapack/CMakeLists.txt b/lapack/CMakeLists.txt
|
||||
index e48497fda..71255d96d 100644
|
||||
--- a/lapack/CMakeLists.txt
|
||||
+++ b/lapack/CMakeLists.txt
|
||||
@@ -1,6 +1,8 @@
|
||||
|
||||
project(EigenLapack CXX)
|
||||
|
||||
+if(EIGEN_BUILD_LAPACK AND EIGEN_BUILD_BLAS)
|
||||
+
|
||||
include(CheckLanguage)
|
||||
check_language(Fortran)
|
||||
if(CMAKE_Fortran_COMPILER)
|
||||
@@ -450,3 +452,6 @@ if(EXISTS ${eigen_full_path_to_testing_lapack})
|
||||
|
||||
endif()
|
||||
|
||||
+elseif(EIGEN_BUILD_LAPACK AND NOT EIGEN_BUILD_BLAS)
|
||||
+ message(FATAL_ERROR "EIGEN_BUILD_LAPACK requires EIGEN_BUILD_BLAS")
|
||||
+endif() #EIGEN_BUILD_LAPACK
|
||||
--
|
||||
2.45.2
|
||||
|
||||
17
package/eigen/Config.in
Normal file
17
package/eigen/Config.in
Normal file
@@ -0,0 +1,17 @@
|
||||
config BR2_PACKAGE_EIGEN
|
||||
bool "eigen"
|
||||
depends on BR2_INSTALL_LIBSTDCPP
|
||||
help
|
||||
Eigen is a C++ template library for linear algebra: vectors,
|
||||
matrices, and related algorithms. It is versatile, fast,
|
||||
elegant and works on many platforms (OS/Compilers).
|
||||
|
||||
This package only installs header files to the include path.
|
||||
If you just want to use Eigen, you can use the header files
|
||||
right away. There is no binary to link to. Eigen is a pure
|
||||
template library defined in the headers.
|
||||
|
||||
http://eigen.tuxfamily.org/
|
||||
|
||||
comment "eigen needs a toolchain w/ C++"
|
||||
depends on !BR2_INSTALL_LIBSTDCPP
|
||||
8
package/eigen/eigen.hash
Normal file
8
package/eigen/eigen.hash
Normal file
@@ -0,0 +1,8 @@
|
||||
# Locally computed
|
||||
sha256 b4c198460eba6f28d34894e3a5710998818515104d6e74e5cc331ce31e46e626 eigen-3.4.0.tar.bz2
|
||||
sha256 51928dce36213c5333ba3172e847d735d4c6e9b7ff2722a326c49067155b82eb COPYING.BSD
|
||||
sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 COPYING.GPL
|
||||
sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 COPYING.LGPL
|
||||
sha256 f5b330efdad110cdd84d585ec61220b0650461fa599e36b13e1726c9346dcfb9 COPYING.MINPACK
|
||||
sha256 fab3dd6bdab226f1c08630b1dd917e11fcb4ec5e1e020e2c16f83a0a13863e85 COPYING.MPL2
|
||||
sha256 c83230b770f17ef1386ea1fd3681271dd98aa93646bdbfb5bff3a1b7050fff9d COPYING.README
|
||||
31
package/eigen/eigen.mk
Normal file
31
package/eigen/eigen.mk
Normal file
@@ -0,0 +1,31 @@
|
||||
################################################################################
|
||||
#
|
||||
# eigen
|
||||
#
|
||||
################################################################################
|
||||
|
||||
EIGEN_VERSION = 3.4.0
|
||||
EIGEN_SOURCE = eigen-$(EIGEN_VERSION).tar.bz2
|
||||
EIGEN_SITE = $(call gitlab,libeigen,eigen,$(EIGEN_VERSION))
|
||||
EIGEN_LICENSE = MPL2, BSD-3-Clause, LGPL-2.1
|
||||
EIGEN_LICENSE_FILES = COPYING.MPL2 COPYING.BSD COPYING.LGPL COPYING.README
|
||||
EIGEN_INSTALL_STAGING = YES
|
||||
EIGEN_INSTALL_TARGET = NO
|
||||
EIGEN_SUPPORTS_IN_SOURCE_BUILD = NO
|
||||
|
||||
# Default Eigen CMake installs .pc file in /usr/share/pkgconfig
|
||||
# change it to /usr/lib/pkgconfig, to be consistent with other packages.
|
||||
EIGEN_CONF_OPTS = -DPKGCONFIG_INSTALL_DIR=/usr/lib/pkgconfig
|
||||
|
||||
ifeq ($(BR2_TOOLCHAIN_HAS_FORTRAN),y)
|
||||
EIGEN_CONF_OPTS += \
|
||||
-DCMAKE_Fortran_COMPILER=$(TARGET_FC) \
|
||||
-DEIGEN_BUILD_BLAS=ON \
|
||||
-DEIGEN_BUILD_LAPACK=ON
|
||||
else
|
||||
EIGEN_CONF_OPTS += \
|
||||
-DEIGEN_BUILD_BLAS=OFF \
|
||||
-DEIGEN_BUILD_LAPACK=OFF
|
||||
endif
|
||||
|
||||
$(eval $(cmake-package))
|
||||
Reference in New Issue
Block a user