Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use PIC for (default) static lib #639

Merged
merged 2 commits into from
Mar 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions prerequisites/install-functions/report_results.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ report_results()
if [[ -d "${compiler_install_root%/}/lib" || -d "${compiler_install_root%/}/lib64" ]]; then
echo "# Prepend the compiler library paths to the ${LD_LIB_P_VAR} environment variable:" | tee -a setup.sh setup.csh
compiler_lib_paths="${compiler_install_root%/}/lib64/:${compiler_install_root%/}/lib"
echo "if [[ -z \"\${!LD_LIB_P_VAR}\" ]]; then " >> setup.sh
echo "if [[ -z \"\${!${LD_LIB_P_VAR}}\" ]]; then " >> setup.sh
echo " export ${LD_LIB_P_VAR}=\"${compiler_lib_paths%/}\" " >> setup.sh
echo "else " >> setup.sh
echo " export ${LD_LIB_P_VAR}=\"${compiler_lib_paths%/}:\${!LD_LIB_P_VAR}\" " >> setup.sh
echo " export ${LD_LIB_P_VAR}=\"${compiler_lib_paths%/}:\${!${LD_LIB_P_VAR}}\" " >> setup.sh
echo "fi " >> setup.sh
echo "setenv LD_LIBRARY_PATH \"${compiler_lib_paths%/}:\${LD_LIBRARY_PATH}\" " >> setup.csh
fi
Expand Down
3 changes: 3 additions & 0 deletions src/mpi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ target_link_libraries(caf_mpi_static
PUBLIC ${MPI_C_LINK_FLAGS}
PUBLIC ${MPI_C_LIBRARIES}
PRIVATE opencoarrays_mod)
set_target_properties(caf_mpi_static
PROPERTIES
POSITION_INDEPENDENT_CODE TRUE)
target_include_directories(caf_mpi
PUBLIC $<$<COMPILE_LANGUAGE:C>:${MPI_C_INCLUDE_PATH}>)
target_include_directories(caf_mpi_static
Expand Down