Skip to content

Commit

Permalink
Fix local builds where CONDA_BUILD_SYSROOT is not defined
Browse files Browse the repository at this point in the history
  • Loading branch information
speth committed Jul 18, 2023
1 parent 588966d commit a1fcf88
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
7 changes: 5 additions & 2 deletions cantera-matlab/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,13 @@ if [[ "${OSX_ARCH}" == "" ]]; then
echo "debug = False" >> cantera.conf
echo "logging = 'debug'" >> cantera.conf
else
echo "cc_flags = '-isysroot ${CONDA_BUILD_SYSROOT}'" >> cantera.conf
if [[ "${CONDA_BUILD_SYSROOT}" != "" ]]; then
echo "cc_flags = '-isysroot ${CONDA_BUILD_SYSROOT}'" >> cantera.conf
echo "no_debug_linker_flags = '-isysroot ${CONDA_BUILD_SYSROOT}'" >> cantera.conf
fi
echo "optimize_flags = ''" >> cantera.conf
echo "debug = False" >> cantera.conf
echo "no_debug_linker_flags = '-isysroot ${CONDA_BUILD_SYSROOT}'" >> cantera.conf

echo "use_rpath_linkage = False" >> cantera.conf
echo "logging = 'debug'" >> cantera.conf
fi
Expand Down
10 changes: 8 additions & 2 deletions cantera/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,16 @@ else
echo "CC = '${CLANG}'" >> cantera.conf
echo "CXX = '${CLANGXX}'" >> cantera.conf
echo "blas_lapack_libs = 'openblas'" >> cantera.conf
echo "cc_flags = '-isysroot ${CONDA_BUILD_SYSROOT} ${CFLAGS}'" >> cantera.conf
if [[ "${CONDA_BUILD_SYSROOT}" != "" ]]; then
echo "cc_flags = '-isysroot ${CONDA_BUILD_SYSROOT} ${CFLAGS}'" >> cantera.conf
echo "no_debug_linker_flags = '${LDFLAGS} -isysroot ${CONDA_BUILD_SYSROOT}'" >> cantera.conf
else
echo "cc_flags = '${CFLAGS}'" >> cantera.conf
echo "no_debug_linker_flags = '${LDFLAGS}'" >> cantera.conf
fi
echo "optimize_flags = ''" >> cantera.conf
echo "debug = False" >> cantera.conf
echo "no_debug_linker_flags = '${LDFLAGS} -isysroot ${CONDA_BUILD_SYSROOT}'" >> cantera.conf

echo "logging = 'debug'" >> cantera.conf
echo "renamed_shared_libraries = False" >> cantera.conf
echo "use_rpath_linkage = False" >> cantera.conf
Expand Down

0 comments on commit a1fcf88

Please sign in to comment.