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

Add environment variables for additional include/library search directories #504

Merged
merged 3 commits into from
Sep 23, 2023
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
6 changes: 4 additions & 2 deletions build_system/Master.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,10 @@ ENDIF ()

string (STRIP "${ACC_LINK_FLAGS}" ACC_LINK_FLAGS)

SET (ACC_INC_DIRS ${ACC_PLOT_INC_DIRS} ${ACC_INC_DIRS} ${MPI_INC_DIRS})
SET (ACC_LIB_DIRS ${ACC_PLOT_LIB_DIRS} ${ACC_LIB_DIRS} ${MPI_LIB_DIRS})
# Environment variables BMAD_USER_INC_DIRS and BMAD_USER_LIB_DIRS hold include/library directories
# to search for include/module or libraries respectively. Multiple directories separated by semicolons.
SET (ACC_INC_DIRS $ENV{BMAD_USER_INC_DIRS} ${ACC_PLOT_INC_DIRS} ${ACC_INC_DIRS} ${MPI_INC_DIRS})
SET (ACC_LIB_DIRS $ENV{BMAD_USER_LIB_DIRS} ${ACC_PLOT_LIB_DIRS} ${ACC_LIB_DIRS} ${MPI_LIB_DIRS})


#--------------------------------------
Expand Down
3 changes: 2 additions & 1 deletion util/Distribution_User_Utility_Wrapper
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ if ( [[ "${CONDA_BUILD}" ]] ) ; then
[ "${ACC_PLOT_PACKAGE}" == "plplot" ] && DIRLIST=( plplot ${DIRLIST[*]} )
else
# List of Project Directories - Order here matters!
DIRLIST=(${ACC_PLOT_PACKAGE_DIR})
DIRLIST=()
[ -d "${ACC_PLOT_PACKAGE_DIR}" ] && DIRLIST=(${ACC_PLOT_PACKAGE_DIR})
for d in hdf5 fftw lapack lapack95 gsl fgsl forest xraylib sim_utils bmad tao cpp_bmad_interface code_examples bsim util_programs lux regression_tests
do
[ -d "$DIST_BASE_DIR/$d" ] && DIRLIST=(${DIRLIST[*]} $d)
Expand Down