Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/marian-nmt/Simple-WebSocket-Server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreidheim <eidheim@gmail.com>2020-09-22 17:43:24 +0300
committereidheim <eidheim@gmail.com>2020-09-22 17:43:24 +0300
commiteca7bfc03ace0a8806133cd773275169dfda433f (patch)
tree424d8b651e156a689ee39b132495fb81e2a821d0
parentc6df27aae15b1b695003e32ab310f71cc6ee3ee8 (diff)
No longer forces BUILD_TESTING to be ON
-rw-r--r--CMakeLists.txt9
1 files changed, 6 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9d2d4f7..6a9cd5e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,7 +3,12 @@ cmake_minimum_required (VERSION 3.0)
project (Simple-WebSocket-Server)
option(USE_STANDALONE_ASIO "set ON to use standalone Asio instead of Boost.Asio" OFF)
-option(BUILD_TESTING "set ON to build library tests" OFF)
+if(CMAKE_SOURCE_DIR STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
+ option(BUILD_TESTING "set ON to build library tests" ON)
+else()
+ option(BUILD_TESTING "set ON to build library tests" OFF)
+endif()
+
add_library(simple-websocket-server INTERFACE)
@@ -60,8 +65,6 @@ if(CMAKE_SOURCE_DIR STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
add_executable(wss_examples wss_examples.cpp)
target_link_libraries(wss_examples simple-websocket-server)
- set(BUILD_TESTING ON)
-
install(FILES asio_compatibility.hpp server_ws.hpp client_ws.hpp server_wss.hpp client_wss.hpp crypto.hpp utility.hpp status_code.hpp mutex.hpp DESTINATION include/simple-websocket-server)
endif()