Author: Michael R. Crusoe <crusoe@ucdavis.edu>
Description: build just the tests, as an option for autopkgtest later
With assistance from Kevin D. Murray; thanks!
--- libcereal.orig/CMakeLists.txt
+++ libcereal/CMakeLists.txt
@@ -3,21 +3,26 @@
 
 option(SKIP_PORTABILITY_TEST "Skip portability tests" OFF)
 
-set(CMAKE_CXX_FLAGS "-std=c++11 -Wall -Werror -g -Wextra -Wshadow -pedantic ${CMAKE_CXX_FLAGS}")
+option(ONLY_TESTS "Don't build docs, or sandbox" OFF)
 
-include_directories(./include)
+set(CMAKE_CXX_FLAGS "-std=c++11 -Wall -Werror -g -Wextra -Wshadow -pedantic ${CMAKE_CXX_FLAGS}")
 
 find_package(Boost COMPONENTS serialization unit_test_framework)
 
 if(Boost_FOUND)
   include_directories(${Boost_INCLUDE_DIRS})
   enable_testing()
+  if(NOT ONLY_TEST)
+    include_directories(./include)
+  endif(NOT ONLY_TEST)
   add_subdirectory(unittests)
 endif(Boost_FOUND)
 
-add_subdirectory(sandbox)
+if(NOT ONLY_TEST)
+ add_subdirectory(sandbox)
+ find_package(Doxygen)
+endif(NOT ONLY_TEST)
 
-find_package(Doxygen)
 if(DOXYGEN_FOUND)
 
   configure_file("${CMAKE_CURRENT_SOURCE_DIR}/doc/doxygen.in" "${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg" @ONLY)
