[mlpack-git] master: Add an option to disable tests (06c34f7)

gitdub at mlpack.org gitdub at mlpack.org
Fri Apr 15 08:03:39 EDT 2016


Repository : https://github.com/mlpack/mlpack
On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/0c945f3d36d92cc49dd2fde536530b40d3129d0a...698248845c4fca0303d1fda6adf9df3af2433a0c

>---------------------------------------------------------------

commit 06c34f7c2f50f90e24a7f7817e649a97fb90b6f9
Author: Michel Zou <xantares09 at hotmail.com>
Date:   Thu Apr 14 22:06:40 2016 +0200

    Add an option to disable tests


>---------------------------------------------------------------

06c34f7c2f50f90e24a7f7817e649a97fb90b6f9
 CMakeLists.txt            | 1 +
 src/mlpack/CMakeLists.txt | 5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index b5bf072..64ff308 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -16,6 +16,7 @@ option(PROFILE "Compile with profiling information" ON)
 option(ARMA_EXTRA_DEBUG "Compile with extra Armadillo debugging symbols." OFF)
 option(MATLAB_BINDINGS "Compile MATLAB bindings if MATLAB is found." OFF)
 option(TEST_VERBOSE "Run test cases with verbose output." OFF)
+option(BUILD_TESTS "Build tests." ON)
 
 enable_testing ()
 
diff --git a/src/mlpack/CMakeLists.txt b/src/mlpack/CMakeLists.txt
index 28e56ec..64b5111 100644
--- a/src/mlpack/CMakeLists.txt
+++ b/src/mlpack/CMakeLists.txt
@@ -8,13 +8,16 @@ set(DIRS
   bindings
   core
   methods
-  tests
 )
 
 foreach(dir ${DIRS})
     add_subdirectory(${dir})
 endforeach()
 
+if (BUILD_TESTS)
+  add_subdirectory(tests)
+endif ()
+
 # MLPACK_SRCS is set in the subdirectories.
 # We don't use a DLL (shared) on Windows because it's a nightmare.  We can't
 # easily generate the .def file and we won't put __declspec(dllexport) next to




More information about the mlpack-git mailing list