From ae800e3aaff86b513a2a67aee31d39c4ff84ef25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20L=C3=BChne?= Date: Wed, 15 Jun 2016 22:52:41 +0200 Subject: [PATCH] Added CMake option to enable tests (disabled by default). --- CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6a50a0f..50182af 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,8 @@ cmake_minimum_required (VERSION 2.8.4) set(project_name clangmm) project(${project_name}) +option(LIBCLANGMM_BUILD_TESTS "Build unit tests" OFF) + if(APPLE) set(Boost_USE_STATIC_LIBS "YES") set(CMAKE_MACOSX_RPATH 1) @@ -9,5 +11,7 @@ endif() add_subdirectory(src) -# enable_testing() -# add_subdirectory(tests) +if(libclangmm_BUILD_TESTS) + enable_testing() + add_subdirectory(tests) +endif()