Skip to content

Commit

Permalink
update git tag for fetch content
Browse files Browse the repository at this point in the history
  • Loading branch information
boulderdaze committed Jun 18, 2024
1 parent 2245400 commit ad0c0ae
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
17 changes: 10 additions & 7 deletions docker/Dockerfile.fortran-nvhpc
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,13 @@ RUN apt update \
&& apt clean

# Set environment variables to install MUSICA using gcc
ENV CXX=g++
ENV CC=gcc
ENV FC=gfortran
ENV FFLAGS="-I/usr/include/"
ENV CXX=nvc++
ENV CC=nvc
ENV FC=nvfortran
# ENV CXX=g++
# ENV CC=gcc
# ENV FC=gfortran
# ENV FFLAGS="-I/usr/include/"

# Build netcdf-fortran
RUN git clone https://github.com/Unidata/netcdf-fortran.git \
Expand All @@ -56,9 +59,9 @@ RUN cd musica \
&& make install -j

# Set environment variables to build MUSICA-Fortran using nvidia compilers
ENV CXX=nvc++
ENV CC=nvc
ENV FC=nvfortran
# ENV CXX=nvc++
# ENV CC=nvc
# ENV FC=nvfortran

RUN cd musica/fortran/test/fetch_content_integration \
&& mkdir build && cd build \
Expand Down
4 changes: 3 additions & 1 deletion fortran/test/fetch_content_integration/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})

include(FetchContent)

set(MUSICA_GIT_TAG "main" CACHE STRING "Git tag for the musica_fortran repository")
set(MUSICA_GIT_TAG "83-solver-result" CACHE STRING "Git tag for the musica_fortran repository")

message(STATUS "Using MUSICA_GIT_TAG: ${MUSICA_GIT_TAG}")


FetchContent_Declare(musica_fortran
# SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../..
GIT_REPOSITORY https://github.com/NCAR/musica.git
GIT_TAG ${MUSICA_GIT_TAG}
)
Expand All @@ -23,6 +24,7 @@ set(MUSICA_BUILD_C_CXX_INTERFACE OFF)
set(MUSICA_BUILD_FORTRAN_INTERFACE ON)
set(MUSICA_ENABLE_TESTS OFF)
set(MUSICA_ENABLE_INSTALL OFF)
set(MUSICA_ENABLE_TUVX OFF)

FetchContent_MakeAvailable(musica_fortran)

Expand Down

0 comments on commit ad0c0ae

Please sign in to comment.