Skip to content

Commit

Permalink
add configure-file capability at install
Browse files Browse the repository at this point in the history
  • Loading branch information
ahoopes committed Mar 30, 2020
1 parent a2b2a4a commit 8c72f8f
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 19 deletions.
14 changes: 14 additions & 0 deletions cmake/functions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,20 @@ function(add_subdirectories)
endfunction()


# install_configured(<files>)
# Installs a file configured with cmake variables
function(install_configured)
cmake_parse_arguments(INSTALL "" "DESTINATION" "" ${ARGN})
foreach(FILE ${INSTALL_UNPARSED_ARGUMENTS})
install(CODE "
message(STATUS \"Configuring: ${CMAKE_INSTALL_PREFIX}/${INSTALL_DESTINATION}/${FILE}\")
set(FS_VERSION ${FS_VERSION})
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${FILE} ${CMAKE_INSTALL_PREFIX}/${INSTALL_DESTINATION} @ONLY)"
)
endforeach()
endfunction()


# install_symlinks(<files> DESTINATION <dir> TYPE <type>)
# Unfortunately, cmake does not follow symlinks when installing files,
# so this is a wrapper for the install() function that will actually follow
Expand Down
6 changes: 5 additions & 1 deletion scripts/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ install(PROGRAMS
rebuild_gca_atlas.csh
rca-base-init
rca-long-tp-init
recon-all
recon-all-exvivo
recon-all.makefile
reconbatchjobs
Expand Down Expand Up @@ -271,6 +270,11 @@ install(PROGRAMS
DESTINATION bin
)

install_configured(
recon-all
DESTINATION bin
)

install_pyscript(
long_submit_jobs
long_qdec_table
Expand Down
21 changes: 3 additions & 18 deletions scripts/recon-all
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,15 @@
#
# recon-all
#
# script to run all of the reconstruction routines
#
# Script to run the entire reconstruction pipline.
# Original Author: Doug Greve
# CVS Revision Info:
# $Author: greve $
# $Date: 2017/02/08 21:17:33 $
# $Revision: 1.601 $
#
# Copyright © 2011-2016 The General Hospital Corporation (Boston, MA) "MGH"
#
# Terms and conditions for use, reproduction, distribution and contribution
# are found in the 'FreeSurfer Software License Agreement' contained
# in the file 'LICENSE' found in the FreeSurfer distribution, and here:
#
# https://surfer.nmr.mgh.harvard.edu/fswiki/FreeSurferSoftwareLicense
#
# Reporting: [email protected]
#
# Copyright © 2011-2020 The General Hospital Corporation (Boston, MA) "MGH"
#

#
umask 002;

set VERSION = '$Id: recon-all,v 1.601 2017/02/08 21:17:33 greve Exp $';
set VERSION = '@FS_VERSION@';
set ProgName = `basename $0`;
set inputargs = ($argv);
set subjid = ();
Expand Down

0 comments on commit 8c72f8f

Please sign in to comment.