Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
libzmq
Commits
e1a89591
Commit
e1a89591
authored
Apr 18, 2019
by
Iwan Paolucci
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Problem: libzmq does not build on QNX 6.6 using CMake #3479
Solution: libm and libsocket have to be linked explicitely
parent
de4d69f5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
3 deletions
+33
-3
CMakeLists.txt
CMakeLists.txt
+21
-2
CMakeLists.txt
tests/CMakeLists.txt
+7
-1
CMakeLists.txt
unittests/CMakeLists.txt
+5
-0
No files found.
CMakeLists.txt
View file @
e1a89591
...
...
@@ -350,8 +350,11 @@ if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND CMAKE_SYSTEM_VERSION STREQUAL "
endif
()
if
(
NOT MSVC
)
check_include_files
(
ifaddrs.h ZMQ_HAVE_IFADDRS
)
message
(
"ZMQ_HAVE_IFADDRS:
${
ZMQ_HAVE_IFADDRS
}
"
)
check_include_files
(
sys/uio.h ZMQ_HAVE_UIO
)
message
(
"ZMQ_HAVE_UIO:
${
ZMQ_HAVE_UIO
}
"
)
check_include_files
(
sys/eventfd.h ZMQ_HAVE_EVENTFD
)
message
(
"ZMQ_HAVE_EVENTFD:
${
ZMQ_HAVE_EVENTFD
}
"
)
if
(
ZMQ_HAVE_EVENTFD AND NOT CMAKE_CROSSCOMPILING
)
zmq_check_efd_cloexec
()
endif
()
...
...
@@ -373,7 +376,9 @@ if(ZMQ_HAVE_WINDOWS)
check_library_exists
(
ws2 fopen
""
HAVE_WS2
)
else
()
check_cxx_symbol_exists
(
SO_PEERCRED sys/socket.h ZMQ_HAVE_SO_PEERCRED
)
message
(
"ZMQ_HAVE_SO_PEERCRED:
${
ZMQ_HAVE_SO_PEERCRED
}
"
)
check_cxx_symbol_exists
(
LOCAL_PEERCRED sys/socket.h ZMQ_HAVE_LOCAL_PEERCRED
)
message
(
"ZMQ_HAVE_LOCAL_PEERCRED:
${
ZMQ_HAVE_LOCAL_PEERCRED
}
"
)
endif
()
find_library
(
RT_LIBRARY rt
)
...
...
@@ -401,26 +406,33 @@ if(NOT MSVC)
set
(
CMAKE_REQUIRED_LIBRARIES rt
)
check_function_exists
(
clock_gettime HAVE_CLOCK_GETTIME
)
set
(
CMAKE_REQUIRED_LIBRARIES
)
message
(
"HAVE_CLOCK_GETTIME:
${
HAVE_CLOCK_GETTIME
}
"
)
set
(
CMAKE_REQUIRED_INCLUDES unistd.h
)
check_function_exists
(
fork HAVE_FORK
)
set
(
CMAKE_REQUIRED_INCLUDES
)
message
(
"HAVE_FORK:
${
HAVE_FORK
}
"
)
set
(
CMAKE_REQUIRED_INCLUDES sys/time.h
)
check_function_exists
(
gethrtime HAVE_GETHRTIME
)
set
(
CMAKE_REQUIRED_INCLUDES
)
message
(
"HAVE_GETHRTIME:
${
HAVE_GETHRTIME
}
"
)
set
(
CMAKE_REQUIRED_INCLUDES stdlib.h
)
check_function_exists
(
mkdtemp HAVE_MKDTEMP
)
set
(
CMAKE_REQUIRED_INCLUDES
)
message
(
"HAVE_MKDTEMP:
${
HAVE_MKDTEMP
}
"
)
set
(
CMAKE_REQUIRED_INCLUDES sys/socket.h
)
check_function_exists
(
accept4 HAVE_ACCEPT4
)
set
(
CMAKE_REQUIRED_INCLUDES
)
message
(
"HAVE_ACCEPT4:
${
HAVE_ACCEPT4
}
"
)
set
(
CMAKE_REQUIRED_INCLUDES string.h
)
check_function_exists
(
strnlen HAVE_STRNLEN
)
set
(
CMAKE_REQUIRED_INCLUDES
)
message
(
"HAVE_STRNLEN:
${
HAVE_STRNLEN
}
"
)
endif
()
add_definitions
(
-D_REENTRANT -D_THREAD_SAFE
)
...
...
@@ -516,7 +528,7 @@ if(${CMAKE_CXX_COMPILER_ID} MATCHES "SunPro")
zmq_check_cxx_flag_prepend
(
"-features=zla"
)
endif
()
if
(
CMAKE_SYSTEM_NAME MATCHES
"SunOS"
OR CMAKE_SYSTEM_NAME MATCHES
"NetBSD"
)
if
(
CMAKE_SYSTEM_NAME MATCHES
"SunOS"
OR CMAKE_SYSTEM_NAME MATCHES
"NetBSD"
OR CMAKE_SYSTEM_NAME MATCHES
"QNX"
)
message
(
STATUS
"Checking whether atomic operations can be used"
)
check_c_source_compiles
(
"\
...
...
@@ -530,7 +542,7 @@ if(CMAKE_SYSTEM_NAME MATCHES "SunOS" OR CMAKE_SYSTEM_NAME MATCHES "NetBSD")
} \
"
HAVE_ATOMIC_H
)
message
(
"HAVE_ATOMIC_H:
${
HAVE_ATOMIC_H
}
"
)
if
(
NOT HAVE_ATOMIC_H
)
set
(
ZMQ_FORCE_MUTEXES 1
)
endif
()
...
...
@@ -1209,6 +1221,9 @@ else()
add_library
(
libzmq-static STATIC $<TARGET_OBJECTS:objects>
${
public_headers
}
${
html-docs
}
${
readme-docs
}
${
zmq-pkgconfig
}
${
CMAKE_CURRENT_BINARY_DIR
}
/version.rc
)
endif
()
if
(
CMAKE_SYSTEM_NAME MATCHES
"QNX"
)
target_link_libraries
(
libzmq-static m
)
endif
()
set_target_properties
(
libzmq-static PROPERTIES
PUBLIC_HEADER
"
${
public_headers
}
"
OUTPUT_NAME
"zmq"
...
...
@@ -1287,6 +1302,10 @@ if(BUILD_STATIC)
if
(
RT_LIBRARY
)
target_link_libraries
(
libzmq-static -lrt
)
endif
()
if
(
CMAKE_SYSTEM_NAME MATCHES
"QNX"
)
add_definitions
(
-DUNITY_EXCLUDE_MATH_H
)
endif
()
endif
()
if
(
BUILD_SHARED
)
...
...
tests/CMakeLists.txt
View file @
e1a89591
...
...
@@ -238,10 +238,16 @@ foreach(test ${tests})
link_directories
(
${
test
}
PRIVATE
"
${
ZeroMQ_SOURCE_DIR
}
/../lib"
)
endif
()
endif
()
if
(
RT_LIBRARY
)
target_link_libraries
(
${
test
}
${
RT_LIBRARY
}
)
endif
()
if
(
CMAKE_SYSTEM_NAME MATCHES
"QNX"
)
target_link_libraries
(
${
test
}
socket
)
target_link_libraries
(
${
test
}
m
)
endif
()
if
(
WIN32
)
add_test
(
NAME
${
test
}
WORKING_DIRECTORY
${
LIBRARY_OUTPUT_PATH
}
COMMAND
${
test
}
)
else
()
...
...
unittests/CMakeLists.txt
View file @
e1a89591
...
...
@@ -41,6 +41,11 @@ foreach(test ${unittests})
target_link_libraries
(
${
test
}
${
RT_LIBRARY
}
)
endif
()
if
(
CMAKE_SYSTEM_NAME MATCHES
"QNX"
)
target_link_libraries
(
${
test
}
socket
)
target_link_libraries
(
${
test
}
m
)
endif
()
if
(
WIN32
)
add_test
(
NAME
${
test
}
WORKING_DIRECTORY
${
LIBRARY_OUTPUT_PATH
}
COMMAND
${
test
}
)
else
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment