Skip to content

Adds new CMake Options for controlling build components. EIGEN_HEADER_ONLY...

New CMake Configurations Options to avoid building BLAS and LPACK on *NIX like systems.

Reference issue

-- No existing issue.

What does this implement/fix?

While completing a cross-compile to Android and I noticed that there was not a very straight forward method to tell CMake that the only thing you want to do is install the Eigen Headers and CMake configuration files. Because, my Windows machine had Fortran on it the cross compile would try to Build BLAS and LPACK even though I did not have a valid cross compiler for Fortran.

This commit adds a new CMake option EIGEN_HEADER_ONLY and two additional granular control options EIGEN_BUILD_BLAS and EIGEN_BUILD_LPACK. These variables mostly wrap add_sub-directory calls in the various CMakeLists.txt files.

Additional information

I often find myself wanting to install the EIGEN headers which you could normally do with a simple cp command, but It is useful to let CMake go ahead and generate the installation configuration files so find_package(Eigen3) will work in other projects. In this case I was creating a Meta CMake project that compiled libBioGears and all hits 3rd part Deps so I needed subsequent projects to properly detect the existence of the Eigen headers.

#Other This is my first use of Gitlab. I see a Red Ex on the CI Pipeline and I'm not sure what the issue is. When I click on the page its fairly sparse on information so I can't tell if the pipeline just doesn't exist or if the page is loading incorrectly. I'm willing to correct any issues if pointed in that direction.

I tested this using Windows, and the Android NDK. The default values of the new parameters mean that no behavior changes occur unless they are set. But all Test and Executables are skipped when EIGEN_HEADER_ONLY is true. Additionally you can turn off building LPACK and BLAS individually, but I added a FATAL_ERROR if LAPACK is true when BLAS is not. Maybe we just want a single var for those as I do not know if its actually useful to have BLAS only for EIGEN.

Merge request reports

Loading