[asl] 161/177: Move input_data to the root

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Thu Aug 27 09:22:51 UTC 2015


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch master
in repository asl.

commit e5e2c56f6a76dc7f02ea67af7e4cd5b10f1dfa87
Author: Avtech Scientific <AvtechScientific at users.noreply.github.com>
Date:   Sun Aug 16 16:00:41 2015 +0300

    Move input_data to the root
---
 COPYRIGHT.md                                                |   2 +-
 README.md                                                   |   4 ++--
 cmake/ASLBuildFunctions.cmake                               |   2 +-
 doc/CMakeLists.txt                                          |   2 +-
 examples/CMakeLists.txt                                     |   4 ++--
 {examples/input_data => input_data}/axial-compressor.stl    | Bin
 {examples/input_data => input_data}/brain.vti               | Bin
 {examples/input_data => input_data}/bus.stl                 | Bin
 {examples/input_data => input_data}/locomotive.pvsm         |   0
 {examples/input_data => input_data}/locomotive.stl          | Bin
 .../input_data => input_data}/multicomponent_flow.pvsm      |   0
 test/testAGL/CMakeLists.txt                                 |   5 ++++-
 test/testAGL/testVTK_IO.cc                                  |   2 ++
 13 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/COPYRIGHT.md b/COPYRIGHT.md
index 9d5773c..1d6dbd1 100644
--- a/COPYRIGHT.md
+++ b/COPYRIGHT.md
@@ -39,7 +39,7 @@ _ASL: Advanced Simulation Library™, an open source multiphysics simulation sof
 
 ## Media files
 
-Some examples require input files (like .vti or .stl) that can be found in `examples/input_data`.
+Some examples require input files (like .vti or .stl) that can be found in `input_data`.
 
 1. All .stl files were originally obtained from [GrabCAD](https://grabcad.com/) and are subject to their [Terms of Service](https://grabcad.com/terms); some of them were modified.
 2. brain.vti was generated using  [BrainWeb](http://brainweb.bic.mni.mcgill.ca/brainweb/).
diff --git a/README.md b/README.md
index cb19d00..7a5f19e 100644
--- a/README.md
+++ b/README.md
@@ -35,9 +35,9 @@ Professional consulting, training and integration services are provided by [Avte
 ### Running an example
 
 1. Go to examples: `cd examples/flow/locomotive`
-2. `./asl-locomotive --input ../../../../ASL/examples/input_data/locomotive.stl`  
+2. Run `./asl-locomotive --input ../../../../ASL/input_data/locomotive.stl`  
 Optionally: change parameters `./asl-locomotive --input locomotive.stl --dx 1 --dt 2` or write all of them into a file for later editing/reuse - `./asl-locomotive -g bigGrid.ini`. List all available options - `./asl-locomotive -h`.
-3. Post-processing: see [step by step example](https://github.com/AvtechScientific/ASL/wiki/User-Guide#post-processing) and `examples/input_data/locomotive.pvsm` - the ParaView state file.
+3. Post-processing: see [step by step example](https://github.com/AvtechScientific/ASL/wiki/User-Guide#post-processing) and `input_data/locomotive.pvsm` - the ParaView state file.
 
 ### Writing your own code using ASL
 
diff --git a/cmake/ASLBuildFunctions.cmake b/cmake/ASLBuildFunctions.cmake
index dc45d7c..d6965ec 100644
--- a/cmake/ASLBuildFunctions.cmake
+++ b/cmake/ASLBuildFunctions.cmake
@@ -74,4 +74,4 @@ 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})
-endfunction(INSTALL_EXAMPLE)
+endfunction(INSTALL_EXAMPLE)
\ No newline at end of file
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index dbcf8b8..a62778d 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -36,4 +36,4 @@ configure_file(
 )
 add_custom_target(docs ${DOXYGEN_EXECUTABLE} ${PROJECT_BINARY_DIR}/doc/Developer-Guide/Doxyfile)
 install(CODE "execute_process(COMMAND ${CMAKE_BUILD_TOOL} docs)")
-install(DIRECTORY ${CMAKE_BINARY_DIR}/doc/html DESTINATION ${CMAKE_INSTALL_DOCDIR})
+install(DIRECTORY ${CMAKE_BINARY_DIR}/doc/html DESTINATION ${CMAKE_INSTALL_DOCDIR})
\ No newline at end of file
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index a74077c..0a3bb97 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -26,5 +26,5 @@ add_subdirectory(levelSet)
 add_subdirectory(jumpingObjects)
 add_subdirectory(heatTransfer)
 add_subdirectory(massTransferSM)
-
-install(DIRECTORY ${CMAKE_SOURCE_DIR}/examples/input_data DESTINATION ${CMAKE_INSTALL_DOCDIR}/examples)
+
+install(DIRECTORY ${CMAKE_SOURCE_DIR}/input_data DESTINATION ${CMAKE_INSTALL_DOCDIR})
\ No newline at end of file
diff --git a/examples/input_data/axial-compressor.stl b/input_data/axial-compressor.stl
similarity index 100%
rename from examples/input_data/axial-compressor.stl
rename to input_data/axial-compressor.stl
diff --git a/examples/input_data/brain.vti b/input_data/brain.vti
similarity index 100%
rename from examples/input_data/brain.vti
rename to input_data/brain.vti
diff --git a/examples/input_data/bus.stl b/input_data/bus.stl
similarity index 100%
rename from examples/input_data/bus.stl
rename to input_data/bus.stl
diff --git a/examples/input_data/locomotive.pvsm b/input_data/locomotive.pvsm
similarity index 100%
rename from examples/input_data/locomotive.pvsm
rename to input_data/locomotive.pvsm
diff --git a/examples/input_data/locomotive.stl b/input_data/locomotive.stl
similarity index 100%
rename from examples/input_data/locomotive.stl
rename to input_data/locomotive.stl
diff --git a/examples/input_data/multicomponent_flow.pvsm b/input_data/multicomponent_flow.pvsm
similarity index 100%
rename from examples/input_data/multicomponent_flow.pvsm
rename to input_data/multicomponent_flow.pvsm
diff --git a/test/testAGL/CMakeLists.txt b/test/testAGL/CMakeLists.txt
index e65827a..95c6989 100644
--- a/test/testAGL/CMakeLists.txt
+++ b/test/testAGL/CMakeLists.txt
@@ -27,4 +27,7 @@ target_link_libraries(testVTK_IO aslnum aslvtk asl)
 add_test(NAME testVTK_IO COMMAND testVTK_IO)
 set_tests_properties(testVTK_IO PROPERTIES LABELS IO)
 # Hardcode the path to the required input file `bus.stl`
-target_compile_definitions(testVTK_IO PRIVATE "INPUT_DATA_DIR=\"${CMAKE_SOURCE_DIR}/examples/input_data/\"")
\ No newline at end of file
+# (tests are not installed, so no need to be relocatable)
+# alternatively `bus.stl` can be copied to the test directory
+# by cmake (configure_file() for a configuration time copy or add_custom_command() for a build time copy)
+target_compile_definitions(testVTK_IO PRIVATE "INPUT_DATA_DIR=\"${CMAKE_SOURCE_DIR}/input_data/\"")
\ No newline at end of file
diff --git a/test/testAGL/testVTK_IO.cc b/test/testAGL/testVTK_IO.cc
index 8c12b37..b8fa8e6 100644
--- a/test/testAGL/testVTK_IO.cc
+++ b/test/testAGL/testVTK_IO.cc
@@ -63,6 +63,8 @@ void testSurfaceSTL()
 
 	// INPUT_DATA_DIR will be expanded by the preprocessor to e.g. "/path/to/dir/"
 	// and the compiler will merge adjacent string literals
+	// alternatively `bus.stl` can be copied to the test directory
+	// by cmake (configure_file() for a configuration time copy or add_custom_command() for a build time copy)
 	auto data(asl::readSurface(INPUT_DATA_DIR "bus.stl", 5));
 //	auto data(asl::readSurface("xx.vtp", .01));
 	

-- 
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