Skip to content

Commit

Permalink
Reorganized postinstall scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ward Fisher committed Nov 18, 2014
1 parent 7947e31 commit aba5029
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,8 @@ ENDIF()
IF(NOT MSVC)
OPTION(BUILD_FORTRAN "Download and build netcdf-fortran automatically (EXPERIMENTAL)." OFF)
IF(BUILD_FORTRAN)
CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/fortran_install.sh.in"
"${CMAKE_BINARY_DIR}/fortran_install.sh"
CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/postinstall.sh.in"
"${CMAKE_BINARY_DIR}/postinstall.sh"
@ONLY)
ENDIF(BUILD_FORTRAN)
ENDIF()
Expand Down
2 changes: 1 addition & 1 deletion PostInstall.cmake
Original file line number Diff line number Diff line change
@@ -1 +1 @@
EXECUTE_PROCESS(COMMAND sh -c "${CMAKE_BINARY_DIR}/fortran_install.sh -t cmake")
EXECUTE_PROCESS(COMMAND sh -c "${CMAKE_BINARY_DIR}/postinstall.sh -t cmake")
5 changes: 3 additions & 2 deletions fortran_install.sh.in → postinstall.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,11 @@ esac

if [ ! -d "netcdf-fortran" ]; then
git clone http://github.com/unidata/netcdf-fortran
cd netcdf-fortran
git checkout v4.4.1
fi

cd netcdf-fortran
git checkout v4.4.1

###
# Invoke cmake to build netcdf-fortran
###
Expand Down

0 comments on commit aba5029

Please sign in to comment.