Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 78664cc9 authored by Mathieu Faverge's avatar Mathieu Faverge
Browse files

cmake: Don't duplicate the SPM_WITH_MPI definition

parent 517fe1c6
No related branches found
No related tags found
1 merge request!124Bugfix: Silent compilation warnings and set -Werror as default on the CI
......@@ -45,18 +45,23 @@ target_include_directories(spmf INTERFACE
$<INSTALL_INTERFACE:include/spm>
)
set( SPM_ENUMS_DEFS "" )
if ( SPM_INT64 )
set_source_files_properties( src/spmf_enums.F90 PROPERTIES COMPILE_DEFINITIONS "SPM_INT_KIND=c_int64_t" )
list(APPEND SPM_ENUMS_DEFS "SPM_INT_KIND=c_int64_t" )
else()
set_source_files_properties( src/spmf_enums.F90 PROPERTIES COMPILE_DEFINITIONS "SPM_INT_KIND=c_int32_t" )
list(APPEND SPM_ENUMS_DEFS "SPM_INT_KIND=c_int32_t" )
endif()
if ( SPM_WITH_MPI )
list(APPEND SPM_ENUMS_DEFS "SPM_WITH_MPI" )
target_compile_definitions(spmf INTERFACE "SPM_WITH_MPI")
target_link_libraries( spmf PUBLIC MPI::MPI_Fortran)
morse_export_imported_target(MPI::MPI_Fortran mpif spm)
endif()
set_source_files_properties( src/spmf_enums.F90 PROPERTIES COMPILE_DEFINITIONS "${SPM_ENUMS_DEFS}" )
# export target spmf
install(EXPORT spmfTargets
FILE spmfTargets.cmake
......
......@@ -17,8 +17,6 @@
!>
module spmf_enums
#include "spm/config.h"
use, intrinsic :: iso_c_binding
#if defined(SPM_WITH_MPI)
use :: mpi_f08, only : MPI_Comm, MPI_COMM_WORLD
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment