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
d44ef4fa
Commit
d44ef4fa
authored
Jul 12, 2016
by
Doron Somech
Committed by
GitHub
Jul 12, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2061 from cowo78/master
Minor fixes/changes in Win32/MSVC build system
parents
f9c86872
7fdb1677
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
4 deletions
+12
-4
CMakeLists.txt
tests/CMakeLists.txt
+7
-3
testutil.hpp
tests/testutil.hpp
+5
-1
No files found.
tests/CMakeLists.txt
View file @
d44ef4fa
...
...
@@ -132,19 +132,23 @@ if(WIN32)
add_definitions
(
-DZMQ_CUSTOM_PLATFORM_HPP
)
add_definitions
(
-D_WINSOCK_DEPRECATED_NO_WARNINGS
)
include_directories
(
../builds/msvc
)
# Same name on 64bit systems
link_libraries
(
Ws2_32.lib
)
endif
()
# add library and include dirs for all targets
link_libraries
(
libzmq
)
include_directories
(
"
${
CMAKE_SOURCE_DIR
}
/../include"
)
include_directories
(
"
${
CMAKE_SOURCE_DIR
}
/src"
)
foreach
(
test
${
tests
}
)
add_executable
(
${
test
}
${
test
}
.cpp
)
if
(
WIN32
)
# it will only link correctly for DEBUG builds in Windows (I don't know how to specify the target and target library in CMake)
SET_TARGET_PROPERTIES
(
${
test
}
PROPERTIES LINK_FLAGS
"/LIBPATH:../bin/Win32/Debug/v120/dynamic"
)
# 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
find_path
(
LIBZMQ_PATH
"libzmq.lib"
PATHS
"../bin/Win32/Debug/v120/dynamic"
)
if
(
NOT
${
LIBZMQ_PATH
}
STREQUAL
"LIBZMQ_PATH-NOTFOUND"
)
SET_TARGET_PROPERTIES
(
${
test
}
PROPERTIES LINK_FLAGS
"/LIBPATH:
${
LIBZMQ_PATH
}
"
)
endif
()
else
()
# per-test directories not generated on OS X / Darwin
if
(
NOT
${
CMAKE_CXX_COMPILER_ID
}
MATCHES
"Clang.*"
)
...
...
tests/testutil.hpp
View file @
d44ef4fa
...
...
@@ -51,10 +51,14 @@
#include <string.h>
#if defined _WIN32
# include "windows.hpp"
# include "
../src/
windows.hpp"
# if defined _MSC_VER
# include <crtdbg.h>
# pragma warning(disable:4996)
// iphlpapi is needed for if_nametoindex (not on Windows XP)
# if !defined ZMQ_HAVE_WINDOWS_TARGET_XP
# pragma comment(lib,"iphlpapi")
# endif
# endif
#else
# include <pthread.h>
...
...
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