diff --git a/CMakeLists.txt b/CMakeLists.txt index 77ef82d1..f19a2c1b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,6 +33,7 @@ option(WITH_BUNDLED_DEPS "Build with bundled dependencies?" ON) option(WITH_TLS "Include SSL/TLS support?" ON) option(WITH_TLS_PSK "Include TLS-PSK support (requires WITH_TLS)?" ON) option(WITH_EC "Include Elliptic Curve support (requires WITH_TLS)?" ON) +option(WITH_TESTS "Enable tests" ON) if (WITH_TLS) find_package(OpenSSL REQUIRED) add_definitions("-DWITH_TLS") @@ -162,6 +163,7 @@ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libmosquittopp.pc" DESTINATION "${CMA # ======================================== # Testing # ======================================== -enable_testing() - -add_subdirectory(test) +if(WITH_TESTS) + enable_testing() + add_subdirectory(test) +endif()