cmake: Add an option to turn on unit testing.
authorAndreas Schneider <asn@cryptomilk.org>
Tue, 9 Oct 2012 10:41:53 +0000 (12:41 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Tue, 9 Oct 2012 10:41:53 +0000 (12:41 +0200)
DefineOptions.cmake
src/CMakeLists.txt

index 820d93db85f1a3c94e9060560fef926d2a6144de..86b94fb9a06fc3cdd2d0accda7ebff522e806aaa 100644 (file)
@@ -1 +1,2 @@
 option(WITH_STATIC_LIB "Build with a static library" OFF)
+option(UNIT_TESTING "Build with unit testing" OFF)
index 8390d609affa190573a61aa87a8a236c9da4c280..f4bd55589937862067c1b40e5f67847c62240fce 100644 (file)
@@ -91,4 +91,6 @@ if (WITH_STATIC_LIB)
 endif (WITH_STATIC_LIB)
 
 add_subdirectory(include)
-add_subdirectory(example)
+if (UNIT_TESTING)
+    add_subdirectory(example)
+endif (UNIT_TESTING)