Skip to content

Commit

Permalink
CHG: Fixes for gfortran path in rpath; new config for CodeQL
Browse files Browse the repository at this point in the history
  • Loading branch information
TidbitSoftware committed Jun 14, 2024
1 parent 0cb8aca commit 1e3507d
Show file tree
Hide file tree
Showing 4 changed files with 104 additions and 35 deletions.
64 changes: 64 additions & 0 deletions jenkins/github-linux-basic-codeql
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
#--------------------#
# ISSM Configuration #
#--------------------#

ISSM_CONFIG='\
--prefix=${ISSM_DIR} \
--disable-static \
--enable-development \
--enable-debugging \
--with-numthreads=4 \
--with-fortran-lib="-L/usr/lib/x86_64-linux-gnu -lgfortran" \
--with-mpi-include=${ISSM_DIR}/externalpackages/petsc/install/include \
--with-mpi-libflags="-L${ISSM_DIR}/externalpackages/petsc/install/lib -lmpi -lmpicxx -lmpifort" \
--with-blas-lapack-dir=${ISSM_DIR}/externalpackages/petsc/install \
--with-metis-dir=${ISSM_DIR}/externalpackages/petsc/install \
--with-parmetis-dir=${ISSM_DIR}/externalpackages/petsc/install \
--with-scalapack-dir=${ISSM_DIR}/externalpackages/petsc/install \
--with-mumps-dir=${ISSM_DIR}/externalpackages/petsc/install \
--with-petsc-dir=${ISSM_DIR}/externalpackages/petsc/install \
--with-triangle-dir=${ISSM_DIR}/externalpackages/triangle/install \
--with-m1qn3-dir=${ISSM_DIR}/externalpackages/m1qn3/install \
--with-semic-dir=${ISSM_DIR}/externalpackages/semic/install \
'

#-------------------#
# External Packages #
#-------------------#

EXTERNALPACKAGES="
autotools install-linux.sh
cmake install.sh
petsc install-3.20-linux.sh
triangle install-linux.sh
m1qn3 install-linux.sh
semic install.sh
shell2junit install.sh
"

#---------#
# Testing #
#---------#

# Test suites
MATLAB_TEST=0
PYTHON_TEST=0
JAVASCRIPT_TEST=0
EXAMPLES_TEST=0

# Number of CPUs used in ISSM compilation
#
# NOTE: One is usually safer as some packages are very sensitive to parallel
# compilation.
#
NUMCPUS_INSTALL=4

# Number of CPUs used in the nightly runs
NUMCPUS_RUN=1

# Nightly run options
#
# See documentation in test/NightlyRun/runme.* for more information.
#
MATLAB_NROPTIONS=""
PYTHON_NROPTIONS=""
29 changes: 14 additions & 15 deletions src/c/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -771,22 +771,21 @@ endif
# - On macOS, static linking of binaries is not supported.
#
if STANDALONE_EXECUTABLES
if MAC
AM_LDFLAGS += -Wl,-rpath,'@loader_path/../lib'
if MAC
AM_LDFLAGS += -Wl,-rpath,'@loader_path/../lib'
else
if MSYS2
AM_LDFLAGS += -Wl,-static
else
AM_LDFLAGS += -Wl,--disable-new-dtags -Wl,-rpath,'$$ORIGIN/../lib'
endif
endif
else
if MSYS2
AM_LDFLAGS += -Wl,-static
else
AM_LDFLAGS += -Wl,--disable-new-dtags -Wl,-rpath,'$$ORIGIN/../lib'
endif
endif
else
if MAC
if HAVE_FORTRANDIR
AM_LDFLAGS += -Wl,-rpath,$(FORTRANDIR)
endif
AM_LDFLAGS += -Wl,-rpath,'/usr/local/gfortran/lib'
endif
if MAC
if HAVE_FORTRANDIR
AM_LDFLAGS += -Wl,-rpath,$(FORTRANDIR)
endif
endif
endif

if VERSION
Expand Down
26 changes: 13 additions & 13 deletions src/wrappers/matlab/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -109,20 +109,20 @@ endif
# - On macOS, static linking of binaries is not supported.
#
if STANDALONE_MODULES
if MAC
AM_LDFLAGS += -Wl,-rpath,'@rpath'
if MAC
AM_LDFLAGS += -Wl,-rpath,'@rpath'
else
AM_LDFLAGS += -Wl,-lbacktrace
if !MSYS2
AM_LDFLAGS += -Wl,-static -Wl,--disable-new-dtags -Wl,-rpath,'$$ORIGIN'
endif
endif
else
AM_LDFLAGS += -Wl,-lbacktrace
if !MSYS2
AM_LDFLAGS += -Wl,-static -Wl,--disable-new-dtags -Wl,-rpath,'$$ORIGIN'
endif
if MAC
if HAVE_FORTRANDIR
AM_LDFLAGS += -Wl,-rpath,$(FORTRANDIR)
endif
AM_LDFLAGS += -Wl,-rpath,'/usr/local/gfortran/lib'
endif
endif
if MAC
if HAVE_FORTRANDIR
AM_LDFLAGS += -Wl,-rpath,$(FORTRANDIR)
endif
endif
endif

AM_CXXFLAGS += -fPIC -D_WRAPPERS_
Expand Down
20 changes: 13 additions & 7 deletions src/wrappers/python/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,20 @@ endif
# - On macOS, static linking of binaries is not supported.
#
if STANDALONE_MODULES
if MAC
AM_LDFLAGS += -Wl,-rpath,'@rpath'
if MAC
AM_LDFLAGS += -Wl,-rpath,'@rpath'
else
AM_LDFLAGS += -Wl,-lbacktrace
if !MSYS2
AM_LDFLAGS += -Wl,-static -Wl,--disable-new-dtags -Wl,-rpath,'$$ORIGIN'
endif
endif
else
AM_LDFLAGS += -Wl,-lbacktrace
if !MSYS2
AM_LDFLAGS += -Wl,-static -Wl,--disable-new-dtags -Wl,-rpath,'$$ORIGIN'
endif
endif
if MAC
if HAVE_FORTRANDIR
AM_LDFLAGS += -Wl,-rpath,$(FORTRANDIR)
endif
endif
endif

AM_CXXFLAGS += -fPIC -D_WRAPPERS_
Expand Down

0 comments on commit 1e3507d

Please sign in to comment.