Properly check and link (C)BLAS and LAPACKE dependencies

Instead of using the adhoc code for checking and including (globally!)
BLAS/LAPACKE, use PkgConfig to correctly identify libs (see deleted
comment: "Hope this gets fixed in future!" -- you are welcome). Next,
only link into those libraries that need it (PHY_UE, SIMU). Note that
only RHEL also needs cblas, so it is a non-REQUIREd dependency that is
only linked in if available. Further, take out linking into all other
modules, as they don't need it.

In the source code, take out preprocessor directives to correctly
include headers -- that is cmake's job, which it does just fine now.
This commit is contained in:
Robert Schmidt
2023-07-07 08:35:28 +02:00
parent 25f2a48265
commit be4c03c90c
3 changed files with 30 additions and 70 deletions
@@ -41,14 +41,8 @@
#include <stdlib.h>
#include <string.h>
#include <linux/version.h>
#if defined RHEL_RELEASE_CODE && RHEL_RELEASE_CODE >= 1796 && RHEL_RELEASE_CODE != 2403
#include <lapacke/lapacke_utils.h>
#include <lapacke/lapacke.h>
#else
#include <lapacke_utils.h>
#include <lapacke.h>
#endif
#include <cblas.h>
#include <lapacke_utils.h>
#include <lapacke.h>
#include "linear_preprocessing_rec.h"
//#define DEBUG_MMSE
@@ -14,13 +14,8 @@ data storage. */
#include <cblas.h>
#include <string.h>
#include <linux/version.h>
#if defined RHEL_RELEASE_CODE && RHEL_RELEASE_CODE >= 1796 && RHEL_RELEASE_CODE != 2403
#include <lapacke/lapacke_utils.h>
#include <lapacke/lapacke.h>
#else
#include <lapacke_utils.h>
#include <lapacke.h>
#endif
//#define DEBUG_PREPROC