diff --git a/CMakeLists.txt b/CMakeLists.txt index a78a8e0..8f20e09 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,13 +1,27 @@ cmake_minimum_required (VERSION 2.6) project (libsettable) -find_package(Boost 1.42 COMPONENTS system unit_test_framework) + +if (NOT ${tests}) + set(enable_tests "off") +else() + set(enable_tests "on") +endif() + +if (${enable_tests} STREQUAL "on") + find_package(Boost 1.42 COMPONENTS system unit_test_framework) +else() + find_package(Boost) +endif() include_directories(${PROJECT_SOURCE_DIR}/src ${Boost_INCLUDE_DIRS}) add_subdirectory(examples) -enable_testing() -add_subdirectory(unittest) + +if (${enable_tests} STREQUAL "on") + enable_testing() + add_subdirectory(unittest) +endif()