Skip to content

Commit

Permalink
Prepend MPI include paths in case of dynamic MPI build (#1585)
Browse files Browse the repository at this point in the history
* (global) include paths added by cmake could contain unnecessary/undesirable
   MPI library headers for dynamic mpi library (see #1566)
 * in order to have preference for corresponding MPI library headers, prepend mpi
   include path so that those paths are added first.
  See: #1566 (comment)

fixes #1566
  • Loading branch information
pramodk authored and alexsavulescu committed Jan 26, 2022
1 parent df7622a commit e6bc984
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nrniv/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ if(NRN_ENABLE_MPI)
list(GET NRN_MPI_LIBNAME_LIST ${val} libname)

add_library(${libname}_lib SHARED ${NRN_NRNMPI_SRC_FILES})
target_include_directories(${libname}_lib PUBLIC ${include})
target_include_directories(${libname}_lib BEFORE PUBLIC ${include})
# Note that we do not link here to libmpi. That is dlopen first.
if(MINGW) # type msmpi only
add_dependencies(${libname}_lib nrniv_lib)
Expand Down

0 comments on commit e6bc984

Please sign in to comment.