[asl] 12/27: Install examples input files
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Sat Nov 26 16:35:43 UTC 2016
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to branch debian/master
in repository asl.
commit 0246d6adb1ebded5b2ef1d0e82433f86d90ea4ba
Author: Avtech Scientific <AvtechScientific at users.noreply.github.com>
Date: Wed Nov 9 12:05:41 2016 +0200
Install examples input files
---
cmake/ASLBuildFunctions.cmake | 8 +++++++-
examples/levelSet/CMakeLists.txt | 2 +-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/cmake/ASLBuildFunctions.cmake b/cmake/ASLBuildFunctions.cmake
index d6965ec..31b985a 100644
--- a/cmake/ASLBuildFunctions.cmake
+++ b/cmake/ASLBuildFunctions.cmake
@@ -59,9 +59,10 @@ function(INSTALL_SUBLIB _SUBLIB _SUBLIB_PUBLIC_HEADERS)
endfunction(INSTALL_SUBLIB)
-# Installs examples: binary and the corresponding source code (preserving source tree structure)
+# Installs examples: binary, the corresponding source code and optionally input data (preserving source tree structure)
# puts `asl-` preffix before binaries in order to avoid name collisions
# creates a separate directory in the build tree to make experimenting easier
+# accepts optional additional parameters - path(s) to required input files, like parameters, geometry files, etc..
function(INSTALL_EXAMPLE _TARGET _SOURCE)
# Add `asl-` preffix in order to avoid name collisions
set_property(TARGET ${_TARGET} PROPERTY OUTPUT_NAME "asl-${_TARGET}")
@@ -74,4 +75,9 @@ function(INSTALL_EXAMPLE _TARGET _SOURCE)
# Extract directories of the relative path
get_filename_component(directories ${relative_path} DIRECTORY)
install(FILES ${_SOURCE} DESTINATION ${CMAKE_INSTALL_DOCDIR}/${directories})
+
+ # Install optional input file(s)
+ foreach(input_file ${ARGN})
+ install(FILES ${input_file} DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}/input/${directories})
+ endforeach()
endfunction(INSTALL_EXAMPLE)
\ No newline at end of file
diff --git a/examples/levelSet/CMakeLists.txt b/examples/levelSet/CMakeLists.txt
index 18510c1..4523297 100644
--- a/examples/levelSet/CMakeLists.txt
+++ b/examples/levelSet/CMakeLists.txt
@@ -33,4 +33,4 @@ INSTALL_EXAMPLE(levelSetNormalGrowth levelSetNormalGrowth.cc)
add_executable(levelSetFacetedGrowth levelSetFacetedGrowth.cc)
target_link_libraries(levelSetFacetedGrowth aslnum aslvtk asl)
-INSTALL_EXAMPLE(levelSetFacetedGrowth levelSetFacetedGrowth.cc)
+INSTALL_EXAMPLE(levelSetFacetedGrowth levelSetFacetedGrowth.cc parameters_levelSetFacetedGrowth.ini)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/asl.git
More information about the debian-science-commits
mailing list