-
Notifications
You must be signed in to change notification settings - Fork 441
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CMake build: Add -DLAPACK option, un-break CBLAS+BLAS build, do not require C++ if unnecessary #972
base: master
Are you sure you want to change the base?
Conversation
All components are optional now, so that only BLAS can be built.
This enables cmake -DLAPACK=off -DLAPACKE=off -DCBLAS=ON -DUSE_OPTIMIZED_BLAS=OFF .. to finish without complaining about cblas missing blas-targets. This installs additional cmake machinery for libblas, which seems to be fair, like the other libs.
The current setup requires a C++ compiler when none is needed, tripping up some build frameworks that are picky about that. And … there are situations where you have a C compiler and no C++.
Does #834 mean that LAPACKE may be built without Fortran … but only LAPACKE? This PR might need some adaptation to only enable Fortran for BLAS, LAPACK … and CBLAS? |
@@ -1,6 +1,6 @@ | |||
cmake_minimum_required(VERSION 3.6) | |||
|
|||
project(LAPACK) | |||
project(LAPACK Fortran C) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the project language specified here, statements enable_language(Fortran)
at lines 226 and 301 are not needed anymore.
@@ -278,6 +282,10 @@ endif() | |||
|
|||
option(USE_OPTIMIZED_LAPACK "Whether or not to use an optimized LAPACK library instead of included netlib LAPACK" OFF) | |||
|
|||
option(LAPACK "Whether to build or use LAPACK (to enable a BLAS-only build)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please be explicit, do not omit OFF
, even though it is the default.
And consider building LAPACK enabled by default, in the project named LAPACK.
This fixes some build issues I face when packaging for pkgsrc using the CMake build.
I hope that can be merged in one go. Though, I have to admit that I am no CMake expert and someone might find further errors. But this works for me at least.