summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAlan Antonuk <aega@med.umich.edu>2012-05-22 14:53:15 -0400
committerAlan Antonuk <aega@med.umich.edu>2012-05-24 15:47:11 -0400
commitc29a40c2ffe48e174f1c212ac715b528693f3edc (patch)
tree9ef25c757f804e75402b6c410afa873af4671d10 /CMakeLists.txt
parentff4e6a2bdf390e0bd6472b7b14baa4d941dff4a2 (diff)
downloadrabbitmq-c-c29a40c2ffe48e174f1c212ac715b528693f3edc.tar.gz
Adding tests/ directory to CMake build
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 168416c..194c25a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -64,6 +64,7 @@ option(BUILD_SHARED_LIBS "Build rabbitmq-c as a shared library" ON)
option(BUILD_EXAMPLES "Build Examples" ON)
option(BUILD_TOOLS "Build Tools (requires POPT Library)" ${POPT_FOUND})
option(BUILD_TOOLS_DOCS "Build man pages for Tools (requires xmlto)" ${DO_DOCS})
+option(BUILD_TESTS "Build tests (run tests with make test)" ON)
if (WIN32 AND NOT BUILD_SHARED_LIBS)
message(FATAL_ERROR "The rabbitmq-c library cannot be built as a static library on Win32. Set BUILD_SHARED_LIBS=ON to get around this.")
@@ -83,6 +84,11 @@ if (BUILD_TOOLS)
endif ()
endif ()
+if (BUILD_TESTS)
+ enable_testing()
+ add_subdirectory(tests)
+endif (BUILD_TESTS)
+
set(prefix ${CMAKE_INSTALL_PREFIX})
set(exec_prefix ${CMAKE_INSTALL_PREFIX}/bin)
set(libdir ${CMAKE_INSTALL_PREFIX}/lib)