This repository was archived by the owner on Mar 20, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +10
-2
lines changed
Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -305,6 +305,7 @@ set_target_properties(coreneuron PROPERTIES
305305 SOVERSION ${VERSION_MAJOR}
306306 CLEAN_DIRECT_OUTPUT 1)
307307
308+ set_property (TARGET coreneuron PROPERTY POSITION_INDEPENDENT_CODE ON )
308309
309310# Extract link defs to the whole project
310311get_target_property (CORENRN_LINK_LIBS coreneuron LINK_LIBRARIES )
Original file line number Diff line number Diff line change @@ -27,6 +27,13 @@ string(REPLACE ";" " " CORENRN_OPTMODS "${CORENRN_OPTMECH_MODS}")
2727# PGI add --c++11;-A option for c++11 flag
2828string (REPLACE ";" " " CXX11_STANDARD_COMPILE_OPTION "${CMAKE_CXX11_STANDARD_COMPILE_OPTION} " )
2929
30+
31+ # MPI path might be multiple directories
32+ if (MPI_C_INCLUDE_PATH)
33+ string (REPLACE ";" " -I" CORENRN_MPI_INCLUDES "${MPI_C_INCLUDE_PATH} " )
34+ endif ()
35+
36+
3037# Compiler flags depending on BUILD_TYPE shared as BUILD_TYPE_<LANG>_FLAGS
3138string (TOUPPER "${CMAKE_BUILD_TYPE} " _BUILD_TYPE)
3239set (BUILD_TYPE_C_FLAGS "${CMAKE_C_FLAGS_${_BUILD_TYPE} }" )
Original file line number Diff line number Diff line change @@ -25,8 +25,8 @@ CORENRNLIB_FLAGS = -L$(libdir) -lcoreneuron
2525
2626# We rebuild the include dirs since a lot of stuff changes place
2727INCLUDES = $(INCFLAGS) -I$(incdir) -I$(incdir)/coreneuron/utils/randoms
28- ifneq (@MPI_C_INCLUDE_PATH @,)
29- INCLUDES += -I@MPI_C_INCLUDE_PATH @
28+ ifneq (@CORENRN_MPI_INCLUDES @,)
29+ INCLUDES += -I@CORENRN_MPI_INCLUDES @
3030endif
3131ifneq (@reportinglib_INCLUDE_DIR@,)
3232 INCLUDES += -I@reportinglib_INCLUDE_DIR@
You can’t perform that action at this time.
0 commit comments