[asl] 122/177: Adding WITH_TESTS cmake options

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Thu Aug 27 09:22:47 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 5c9057eff2ecc887984b2021246a15357758adf8
Author: Avtech Scientific <AvtechScientific at users.noreply.github.com>
Date:   Wed Jul 29 12:46:08 2015 +0300

    Adding WITH_TESTS cmake options
---
 CMakeLists.txt                              | 21 ++++++++++-----------
 README.md                                   |  4 ++--
 cmake/ASLBuildOptions.cmake                 |  3 ++-
 test/testACL/CMakeLists.txt                 |  5 -----
 utilities/CMakeLists.txt                    |  6 ++++++
 {test/testACL => utilities}/asl-hardware.cc |  0
 6 files changed, 20 insertions(+), 19 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8474dda..f6b4d7c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -37,17 +37,7 @@ include(${VTK_USE_FILE})
 include_directories(SYSTEM ${OpenCL_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})
 
 add_subdirectory(src)
-
-# ToDo: move installation of asl-hardware out of the tests
-# and add/enable WITH_TESTS option
-# if (WITH_TESTS)
-	# Input/Output tests are labled "IO" and may require input files
-	# Performance tests are labled "Performance"
-	# Run them: ctest [-C Release|Debug] -L Performance
-	# Exclude them: ctest [-C Release|Debug] -LE Performance
-	enable_testing()
-	add_subdirectory(test)
-# endif()
+add_subdirectory(utilities)
 
 if (WITH_EXAMPLES)
 	add_subdirectory(examples)
@@ -56,6 +46,15 @@ endif()
 if (WITH_API_DOC)
 	add_subdirectory(doc)
 endif()
+
+if (WITH_TESTS)
+	# Input/Output tests are labled "IO" and may require input files
+	# Performance tests are labled "Performance"
+	# Run them: ctest [-C Release|Debug] -L Performance
+	# Exclude them: ctest [-C Release|Debug] -LE Performance
+	enable_testing()
+	add_subdirectory(test)
+endif()
 
 # Packaging
 set(CPACK_GENERATOR "TGZ")
diff --git a/README.md b/README.md
index 63fc557..ae2e4ba 100644
--- a/README.md
+++ b/README.md
@@ -22,8 +22,8 @@ Professional consulting, training and integration services are provided by [Avte
 ### Installation
 
 1. Install [cmake](http://cmake.org) (>=3.0.2, BSD License) and the required libraries:
-	- [OpenCL](https://www.khronos.org/opencl) (>=1.1, OpenCL Specification License)
-	- [C++ bindings for OpenCL](https://www.khronos.org/registry/cl/api/1.1/cl.hpp) (>=1.1, OpenCL Specification License)
+	- [OpenCL](https://www.khronos.org/opencl) (1.1 or 1.2 (2.0 supplies no C++ bindings), OpenCL Specification License)
+	- [C++ bindings for OpenCL](https://www.khronos.org/registry/cl/api/1.1/cl.hpp) (1.1 or 1.2 (2.0 supplies no C++ bindings), OpenCL Specification License)
 	- [boost](http://www.boost.org) (>=1.55, Boost Software License)
 	- [VTK](http://vtk.org) (>=6.1, BSD License)
 	- [optional](https://github.com/AvtechScientific/ASL/blob/master/cmake/ASLBuildOptions.cmake#L3): Matlab support with [matio](https://sourceforge.net/projects/matio) (>=1.5.2, BSD License)
diff --git a/cmake/ASLBuildOptions.cmake b/cmake/ASLBuildOptions.cmake
index 83ec912..66de4f5 100644
--- a/cmake/ASLBuildOptions.cmake
+++ b/cmake/ASLBuildOptions.cmake
@@ -1,4 +1,5 @@
 option(BUILD_SHARED_LIBS "Build shared libraries" ON)
 option(WITH_EXAMPLES "Build with examples" ON)
 option(WITH_MATIO "Build with Matlab support" OFF)
-option(WITH_API_DOC "Compile doxygen API documentation" OFF)
\ No newline at end of file
+option(WITH_API_DOC "Compile doxygen API documentation" OFF)
+option(WITH_TESTS "Build with tests" ON)
\ No newline at end of file
diff --git a/test/testACL/CMakeLists.txt b/test/testACL/CMakeLists.txt
index 1ec36ae..31bef4d 100644
--- a/test/testACL/CMakeLists.txt
+++ b/test/testACL/CMakeLists.txt
@@ -1,10 +1,5 @@
 include_directories(${CMAKE_SOURCE_DIR}/src)
 
-# Install asl-hardware
-add_executable(asl-hardware asl-hardware.cc)
-target_link_libraries(asl-hardware aslacl)
-install(TARGETS asl-hardware RUNTIME DESTINATION  ${CMAKE_INSTALL_BINDIR})
-
 add_executable(testVectorOfElements testVectorOfElements.cc)
 target_link_libraries(testVectorOfElements aslacl)
 add_test(NAME testVectorOfElements COMMAND testVectorOfElements)
diff --git a/utilities/CMakeLists.txt b/utilities/CMakeLists.txt
new file mode 100644
index 0000000..d0d92ee
--- /dev/null
+++ b/utilities/CMakeLists.txt
@@ -0,0 +1,6 @@
+include_directories(${CMAKE_SOURCE_DIR}/src)
+
+# Install asl-hardware
+add_executable(asl-hardware asl-hardware.cc)
+target_link_libraries(asl-hardware aslacl)
+install(TARGETS asl-hardware RUNTIME DESTINATION  ${CMAKE_INSTALL_BINDIR})
\ No newline at end of file
diff --git a/test/testACL/asl-hardware.cc b/utilities/asl-hardware.cc
similarity index 100%
rename from test/testACL/asl-hardware.cc
rename to utilities/asl-hardware.cc

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