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
552c1361
Commit
552c1361
authored
Feb 06, 2015
by
Bryan Zimmerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
replace check_library and check_include with find_file and find_library
parent
05df7072
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
10 deletions
+49
-10
CMakeLists.txt
CMakeLists.txt
+49
-10
No files found.
CMakeLists.txt
View file @
552c1361
...
@@ -103,8 +103,6 @@ list(APPEND CMAKE_MODULE_PATH ${ZMQ_CMAKE_MODULES_DIR})
...
@@ -103,8 +103,6 @@ list(APPEND CMAKE_MODULE_PATH ${ZMQ_CMAKE_MODULES_DIR})
include
(
TestZMQVersion
)
include
(
TestZMQVersion
)
include
(
ZMQSourceRunChecks
)
include
(
ZMQSourceRunChecks
)
include
(
CheckIncludeFiles
)
include
(
CheckLibraryExists
)
include
(
CheckCCompilerFlag
)
include
(
CheckCCompilerFlag
)
include
(
CheckCXXCompilerFlag
)
include
(
CheckCXXCompilerFlag
)
include
(
CheckCSourceCompiles
)
include
(
CheckCSourceCompiles
)
...
@@ -112,16 +110,57 @@ include(CheckCSourceRuns)
...
@@ -112,16 +110,57 @@ include(CheckCSourceRuns)
include
(
CMakeDependentOption
)
include
(
CMakeDependentOption
)
include
(
CheckCXXSymbolExists
)
include
(
CheckCXXSymbolExists
)
check_include_files
(
ifaddrs.h ZMQ_HAVE_IFADDRS
)
# MACRO to find include file
check_include_files
(
windows.h ZMQ_HAVE_WINDOWS
)
macro
(
zmq_find_include include_name var_result
)
check_include_files
(
sys/uio.h ZMQ_HAVE_UIO
)
message
(
STATUS
"Looking for header
${
include_name
}
"
)
check_include_files
(
sys/eventfd.h ZMQ_HAVE_EVENTFD
)
find_file
(
file_result NAMES
"
${
include_name
}
"
)
message
(
STATUS
"Find File result -
${
file_result
}
"
)
string
(
FIND
"
${
file_result
}
"
"NOTFOUND"
pos
)
if
(
pos EQUAL -1
)
#found include file
message
(
STATUS
"Looking for header
${
include_name
}
- found"
)
set
(
"
${
var_result
}
"
"
${
file_result
}
"
)
else
()
# did not find include
message
(
STATUS
"Looking for header
${
include_name
}
- not found"
)
set
(
"
${
var_result
}
"
""
)
endif
()
#clear the find result
unset
(
file_result CACHE
)
endmacro
()
check_library_exists
(
ws2_32 printf
""
HAVE_WS2_32
)
# TODO: Why doesn't something logical like WSAStartup work?
# MACRO to find a library
check_library_exists
(
ws2 printf
""
HAVE_WS2
)
macro
(
zmq_find_library library_name var_result
)
check_library_exists
(
rpcrt4 printf
""
HAVE_RPCRT4
)
# UuidCreateSequential
message
(
STATUS
"Looking for library
${
library_name
}
"
)
check_library_exists
(
iphlpapi printf
""
HAVE_IPHLAPI
)
# GetAdaptersAddresses
find_library
(
lib_result NAMES
"
${
library_name
}
"
)
message
(
STATUS
"Find Library result -
${
lib_result
}
"
)
string
(
FIND
"
${
lib_result
}
"
"NOTFOUND"
pos
)
if
(
pos EQUAL -1
)
#found library
message
(
STATUS
"Looking for library
${
library_name
}
- found"
)
set
(
"
${
var_result
}
"
"
${
lib_result
}
"
)
else
()
# did not find library
message
(
STATUS
"Looking for library
${
library_name
}
- not found"
)
set
(
"
${
var_result
}
"
""
)
endif
()
#clear the find result
unset
(
lib_result CACHE
)
endmacro
()
#use find file instead of check_include_files
zmq_find_include
(
"ifaddrs.h"
ZMQ_HAVE_IFADDRS
)
zmq_find_include
(
"windows.h"
ZMQ_HAVE_WINDOWS
)
zmq_find_include
(
"sys/uio.h"
ZMQ_HAVE_UIO
)
zmq_find_include
(
"sys/eventfd.h"
ZMQ_HAVE_EVENTFD
)
#use find library instead of check library which fails on VS2015
zmq_find_library
(
"ws2_32"
HAVE_WS2_32
)
message
(
STATUS
"
${
HAVE_WS2_32
}
"
)
zmq_find_library
(
"ws2"
HAVE_WS2
)
zmq_find_library
(
"rpcrt4"
HAVE_RPCRT4
)
# UuidCreateSequential
zmq_find_library
(
"iphlpapi"
HAVE_IPHLAPI
)
# GetAdaptersAddresses
check_cxx_symbol_exists
(
SO_PEERCRED sys/socket.h ZMQ_HAVE_SO_PEERCRED
)
check_cxx_symbol_exists
(
SO_PEERCRED sys/socket.h ZMQ_HAVE_SO_PEERCRED
)
check_cxx_symbol_exists
(
LOCAL_PEERCRED sys/socket.h ZMQ_HAVE_LOCAL_PEERCRED
)
check_cxx_symbol_exists
(
LOCAL_PEERCRED sys/socket.h ZMQ_HAVE_LOCAL_PEERCRED
)
...
...
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