Skip to content

Commit 6ce7a84

Browse files
committed
Fix TRANTOR_USE_TLS which should not be using option but set the cache directly.
1 parent 5000e2a commit 6ce7a84

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

CMakeLists.txt

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ option(BUILD_DOC "Build Doxygen documentation" OFF)
55
option(BUILD_C-ARES "Build C-ARES" ON)
66
option(BUILD_TESTING "Build tests" OFF)
77
option(BUILD_SHARED_LIBS "Build trantor as a shared lib" OFF)
8-
option(TRANTOR_USE_TLS
9-
"TLS provider for trantor. Valid options are 'openssl', 'botan' or '' (let the build scripr decide)" ""
10-
)
8+
set(TRANTOR_USE_TLS "" CACHE STRING
9+
"TLS provider for trantor. Valid options are 'openssl', 'botan', 'none' or '' (auto-detect)")
10+
set_property(CACHE TRANTOR_USE_TLS PROPERTY STRINGS "" openssl botan none)
1111
option(USE_SPDLOG "Allow using the spdlog logging library" OFF)
1212

1313
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake_modules/)
@@ -158,10 +158,6 @@ else(WIN32)
158158
set(TRANTOR_SOURCES ${TRANTOR_SOURCES} trantor/net/inner/FileBufferNodeUnix.cc)
159159
endif(WIN32)
160160

161-
# Somehow the default value of TRANTOR_USE_TLS is OFF
162-
if(TRANTOR_USE_TLS STREQUAL OFF)
163-
set(TRANTOR_USE_TLS "")
164-
endif()
165161
set(VALID_TLS_PROVIDERS "openssl" "botan" "none")
166162
list(
167163
FIND

0 commit comments

Comments
 (0)