diff --git a/CMakeLists.txt b/CMakeLists.txt index cd6749b4a..70d30e1e1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,6 +7,8 @@ cmake_minimum_required(VERSION 2.8) project(CPP-NETLIB) option( CPP-NETLIB_BUILD_SHARED_LIBS "Build cpp-netlib as shared libraries." OFF ) +option( CPP-NETLIB_BUILD_TESTS "Build the cpp-netlib project tests." ON) +option( CPP-NETLIB_BUILD_EXAMPLES "Build the cpp-netlib project examples." ON) include(GNUInstallDirs) @@ -82,12 +84,16 @@ if (Boost_FOUND) include_directories(${Boost_INCLUDE_DIRS}) enable_testing() add_subdirectory(libs/network/src) - add_subdirectory(libs/network/test) + if (CPP-NETLIB_BUILD_TESTS) + add_subdirectory(libs/network/test) + endif (CPP-NETLIB_BUILD_TESTS) add_subdirectory(libs/network/experiment) - if (NOT MSVC) + if (NOT MSVC AND CPP-NETLIB_BUILD_TESTS) add_subdirectory(libs/mime/test) - endif(NOT MSVC) - add_subdirectory(libs/network/example) + endif(NOT MSVC AND CPP-NETLIB_BUILD_TESTS) + if (CPP-NETLIB_BUILD_EXAMPLES) + add_subdirectory(libs/network/example) + endif (CPP-NETLIB_BUILD_EXAMPLES) endif(Boost_FOUND) if (MSVC)