From aedad4bc3064877c9d2d115c60789bf02be458c9 Mon Sep 17 00:00:00 2001 From: Mathieu Faverge <mathieu.faverge@inria.fr> Date: Wed, 9 Aug 2017 16:37:09 +0200 Subject: [PATCH] Protect Fortran files and fix undeclared warnings --- CMakeLists.txt | 10 ++++++++-- spm_read_driver.c | 3 ++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5b18c9ea..c9165c3c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -67,16 +67,22 @@ set(spm_sources spm_dof_extend.c spm_read_driver.c spm_gen_fake_values.c - drivers/skitf.f drivers/iohb.c drivers/mmio.c drivers/laplacian.c drivers/readhb.c drivers/readijv.c drivers/readmm.c - drivers/readrsa.c ) +if (PASTIX_WITH_FORTRAN) + set(spm_sources + ${spm_sources} + drivers/skitf.f + drivers/readrsa.c + ) +endif() + add_library(pastix_spm ${spm_sources} ) diff --git a/spm_read_driver.c b/spm_read_driver.c index 6ca1cb6d..a0817089 100644 --- a/spm_read_driver.c +++ b/spm_read_driver.c @@ -82,10 +82,11 @@ spmReadDriver( pastix_driver_t driver, { switch(driver) { +#if defined(PASTIX_WITH_FORTRAN) case PastixDriverRSA: readRSA( filename, spm ); break; - +#endif case PastixDriverHB: /* TODO: Possible to read the RHS, the solution or a guess of the solution */ readHB( filename, spm ); -- GitLab