0
0
mirror of https://github.com/OpenVPN/openvpn3.git synced 2024-09-20 12:12:15 +02:00
openvpn3/test/ssl/CMakeLists.txt
David Sommerseth 2a5f0ee76f
docs: Update README
The README file had several deprecated ways of building various test
binaries.  Clean up this and direct users towards using CMake
everywhere.

The change to test/ssl/CMakeLists.txt covers various build-time
parameters the deprecated build script supported.

Signed-off-by: David Sommerseth <davids@openvpn.net>
2021-04-22 12:54:34 +02:00

31 lines
1.1 KiB
CMake

set(TEST_PROTO_NTHREADS 1 CACHE STRING "test/ssl/proto - Number of threads")
set(TEST_PROTO_RENEG 900 CACHE STRING "test/ssl/proto - Renegotiation intervall")
set(TEST_PROTO_ITER 1000000 CACHE STRING "test/ssl/proto - Number of iterations")
set(TEST_PROTO_SITER 1 CACHE STRING "test/ssl/proto - Number of high-level iterations")
option(TEST_PROTO_VERBOSE "test/ssl/proto - Enable verbose logging" OFF)
add_executable(proto proto.cpp)
add_core_dependencies(proto)
if (${TEST_PROTO_VERBOSE})
set(PROTO_CFLAGS_VERBOSE -DVERBOSE)
endif()
target_compile_definitions(proto PRIVATE
${PROTO_CFLAGS_VERBOSE}
-DN_THREADS=${TEST_PROTO_NTHREADS}
-DRENEG=${TEST_PROTO_RENEG}
-DITER=${TEST_PROTO_ITER}
-DSITER=${TEST_PROTO_SITER}
)
# Copy key/certificate files required to run proto
file(COPY . DESTINATION ${CMAKE_CURRENT_BINARY_DIR}
FILES_MATCHING PATTERN *.key
PATTERN *.crt
PATTERN dh.pem
)
if (NOT WIN32)
# We have a number of private fields that depend on compile flags for manual testing
target_compile_options(proto PRIVATE -Wno-unused-private-field)
endif ()