Skip to content

Commit

Permalink
Fix double cmake call
Browse files Browse the repository at this point in the history
  • Loading branch information
abussy committed Aug 27, 2024
1 parent b482dfd commit bd6e320
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions S/SIRIUS/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,23 @@ if [[ "${target}" == *-apple-mpitrampoline ]]; then
-DMPI_hwloc_LIBRARY=${libdir}/libhwloc.dylib"
fi
#need to pass various results of CMake's try_run() for MPI compilers for succesful build
CMAKE_ARGS="${CMAKE_ARGS} -DMPI_RUN_RESULT_C_libver_mpi_normal=0 \
-DMPI_RUN_RESULT_C_libver_mpi_normal__TRYRUN_OUTPUT='' \
-DMPI_RUN_RESULT_CXX_libver_mpi_normal=0 \
-DMPI_RUN_RESULT_CXX_libver_mpi_normal__TRYRUN_OUTPUT='' \
-DMPI_RUN_RESULT_Fortran_libver_mpi_F90_MODULE=0 \
-DMPI_RUN_RESULT_Fortran_libver_mpi_F90_MODULE__TRYRUN_OUTPUT='' \
-DMPI_RUN_RESULT_Fortran_libver_mpi_F08_MODULE=0 \
-DMPI_RUN_RESULT_Fortran_libver_mpi_F08_MODULE__TRYRUN_OUTPUT=''"
cmake .. ${CMAKE_ARGS}
#On MacOS, need to explicitly remove the -fallow-argument-mismatch flag, because not recognized by Clang
if [[ "${target}" == *-apple* ]]; then
CMAKE_ARGS="${CMAKE_ARGS} -DMPI_Fortran_COMPILE_OPTIONS:STRING=''"
cmake .. "-DMPI_Fortran_COMPILE_OPTIONS=''"
fi
#somehow need to run cmake twice for MPI Fortran to work
cmake .. ${CMAKE_ARGS} || cmake .. ${CMAKE_ARGS}
make -j${nproc} install
"""

Expand Down

0 comments on commit bd6e320

Please sign in to comment.