From 50c696156fb71afb23a0b5c74d6b9fe271d4fbc1 Mon Sep 17 00:00:00 2001 From: Mathieu Faverge <mathieu.faverge@inria.fr> Date: Sat, 31 Mar 2018 13:03:10 +0200 Subject: [PATCH] Add tests directory --- CMakeLists.txt | 19 ++++++++++++++++++- src/spm_read_driver.c | 6 +++--- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 63061c76..453ae75e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,7 +9,7 @@ # ### cmake_minimum_required (VERSION 3.0) -project (SPM C) +project (SPM C Fortran) # Check if compiled independently or within another project if ( ${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}) @@ -40,6 +40,21 @@ else() "Choose between int32 and int64 for integer representation" ON) endif() +if ( PASTIX_WITH_FORTRAN ) + set( SPM_WITH_FORTRAN ${SPM_WITH_FORTRAN} ) +else() + option(SPM_WITH_FORTRAN + "Enable Fortran files/interface/examples to be compiled" ON) +endif() + +if (SPM_WITH_FORTRAN) + include(FortranCInterface) + FortranCInterface_HEADER(src/FCmangle.h + MACRO_NAMESPACE "FC_" + SYMBOL_NAMESPACE "FC_") + link_directories( ${CMAKE_Fortran_IMPLICIT_LINK_DIRECTORIES} ) +endif() + list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules") include(GenSPMPkgConfig) @@ -206,3 +221,5 @@ add_documented_files( src/spm_dof_extend.c src/spm_integers.c ) + +add_subdirectory(tests) diff --git a/src/spm_read_driver.c b/src/spm_read_driver.c index 1077595c..d07c461b 100644 --- a/src/spm_read_driver.c +++ b/src/spm_read_driver.c @@ -64,9 +64,9 @@ *******************************************************************************/ int spmReadDriver( spm_driver_t driver, - const char *filename, - spmatrix_t *spm, - MPI_Comm comm ) + const char *filename, + spmatrix_t *spm, + MPI_Comm comm ) { int mpirank = 0; /* int mpiinit; */ -- GitLab