mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-10 16:06:09 +00:00
Merge pull request #2729 from bluca/cmake
Problems: ZMQ_HAVE_O_CLOEXEC not defined by CMake, support for CMake << 3.1 broken
This commit is contained in:
commit
4691714d5c
@ -24,6 +24,8 @@
|
|||||||
#cmakedefine ZMQ_HAVE_SO_PEERCRED
|
#cmakedefine ZMQ_HAVE_SO_PEERCRED
|
||||||
#cmakedefine ZMQ_HAVE_LOCAL_PEERCRED
|
#cmakedefine ZMQ_HAVE_LOCAL_PEERCRED
|
||||||
|
|
||||||
|
#cmakedefine ZMQ_HAVE_O_CLOEXEC
|
||||||
|
|
||||||
#cmakedefine ZMQ_HAVE_SOCK_CLOEXEC
|
#cmakedefine ZMQ_HAVE_SOCK_CLOEXEC
|
||||||
#cmakedefine ZMQ_HAVE_SO_KEEPALIVE
|
#cmakedefine ZMQ_HAVE_SO_KEEPALIVE
|
||||||
#cmakedefine ZMQ_HAVE_TCP_KEEPCNT
|
#cmakedefine ZMQ_HAVE_TCP_KEEPCNT
|
||||||
|
@ -147,7 +147,20 @@ link_libraries(libzmq ${OPTIONAL_LIBRARIES})
|
|||||||
include_directories("${CMAKE_SOURCE_DIR}/../include")
|
include_directories("${CMAKE_SOURCE_DIR}/../include")
|
||||||
|
|
||||||
foreach(test ${tests})
|
foreach(test ${tests})
|
||||||
add_executable(${test} ${test}.cpp)
|
# target_sources not supported before CMake 3.1
|
||||||
|
if (ZMQ_HAVE_CURVE AND ${test} MATCHES test_security_curve)
|
||||||
|
add_executable(${test} ${test}.cpp
|
||||||
|
"../src/tweetnacl.c"
|
||||||
|
"../src/err.cpp"
|
||||||
|
"../src/random.cpp"
|
||||||
|
"../src/clock.cpp"
|
||||||
|
"testutil_security.hpp")
|
||||||
|
elseif (${test} MATCHES test_security_zap)
|
||||||
|
add_executable(${test} ${test}.cpp
|
||||||
|
"testutil_security.hpp")
|
||||||
|
else ()
|
||||||
|
add_executable(${test} ${test}.cpp)
|
||||||
|
endif ()
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
# This is the output for Debug dynamic builds on Visual Studio 6.0
|
# This is the output for Debug dynamic builds on Visual Studio 6.0
|
||||||
# You should provide the correct directory, don't know how to do it automatically
|
# You should provide the correct directory, don't know how to do it automatically
|
||||||
@ -179,21 +192,11 @@ if(ZMQ_HAVE_CURVE)
|
|||||||
set_tests_properties(test_security_curve PROPERTIES TIMEOUT 60)
|
set_tests_properties(test_security_curve PROPERTIES TIMEOUT 60)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
#add additional required files
|
#add additional required flags
|
||||||
if(ZMQ_HAVE_CURVE)
|
if(ZMQ_HAVE_CURVE)
|
||||||
target_sources(test_security_curve PRIVATE
|
|
||||||
"../src/tweetnacl.c"
|
|
||||||
"../src/err.cpp"
|
|
||||||
"../src/random.cpp"
|
|
||||||
"../src/clock.cpp"
|
|
||||||
"testutil_security.hpp"
|
|
||||||
)
|
|
||||||
target_compile_definitions(test_security_curve PRIVATE "-DZMQ_USE_TWEETNACL")
|
target_compile_definitions(test_security_curve PRIVATE "-DZMQ_USE_TWEETNACL")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_sources(test_security_zap PRIVATE
|
|
||||||
"testutil_security.hpp"
|
|
||||||
)
|
|
||||||
set_tests_properties(test_security_zap PROPERTIES TIMEOUT 60)
|
set_tests_properties(test_security_zap PROPERTIES TIMEOUT 60)
|
||||||
|
|
||||||
#Check whether all tests in the current folder are present
|
#Check whether all tests in the current folder are present
|
||||||
|
Loading…
x
Reference in New Issue
Block a user