buildroot/package/eigen/eigen.mk
Fabrice Fontaine aeeb621e72 package/eigen: fix build without Fortran
Fix the following build failure without a working Fortran compiler:

CMake Error at /nvmedata/autobuild/instance-17/output-1/host/share/cmake-3.18/Modules/CMakeTestFortranCompiler.cmake:51 (message):
  The Fortran compiler

    "/usr/bin/f95"

  is not able to compile a simple test program.

Fixes:
 - http://autobuild.buildroot.org/results/37f3f40ee39739b5e557d634b71a448762107a4b

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-06-06 14:57:12 +02:00

32 lines
973 B
Makefile

################################################################################
#
# 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))