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
2cd4c38b
Commit
2cd4c38b
authored
9 years ago
by
Pieter Hintjens
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1843 from opedroso/WINDOWS_MAKE_TEST
Problem: Tests do no build in Windows environment
parents
0916c17b
1c9cec22
master
v4.3.2
v4.3.2-win
v4.3.1
v4.3.0
v4.2.5
v4.2.4
v4.2.3
v4.2.2
v4.2.1
v4.2.0
v4.2.0-rc1
No related merge requests found
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
2 deletions
+31
-2
CMakeLists.txt
tests/CMakeLists.txt
+23
-2
README.md
tests/README.md
+8
-0
No files found.
tests/CMakeLists.txt
View file @
2cd4c38b
# CMake build script for ZeroMQ tests
cmake_minimum_required
(
VERSION
"2.8.1"
)
# name of Windows project will tests.sln
PROJECT
(
tests
)
set
(
tests
test_system
...
...
@@ -105,10 +109,26 @@ if(WITH_VMCI)
)
endif
()
# add location of platform.hpp for Windows builds
if
(
WIN32
)
add_definitions
(
-DZMQ_CUSTOM_PLATFORM_HPP
)
include_directories
(
../builds/msvc
)
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
)
target_include_directories
(
${
test
}
PRIVATE
"
${
CMAKE_SOURCE_DIR
}
/src"
)
target_link_libraries
(
${
test
}
libzmq
)
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"
)
else
()
link_directories
(
${
test
}
PRIVATE
"
${
CMAKE_SOURCE_DIR
}
/../lib"
)
endif
()
if
(
RT_LIBRARY
)
target_link_libraries
(
${
test
}
${
RT_LIBRARY
}
)
...
...
@@ -137,3 +157,4 @@ foreach(TEST_SOURCE ${ALL_TEST_SOURCES})
message
(
AUTHOR_WARNING
"Test '
${
TESTNAME
}
' is not known to CTest."
)
endif
()
endforeach
()
This diff is collapsed.
Click to expand it.
tests/README.md
View file @
2cd4c38b
...
...
@@ -16,3 +16,11 @@ On many slower environments, like embedded systems, VMs or CI systems, test migh
fail because it takes time for sockets to settle after a connect. If you need
to add a sleep, please be consistent with all the other tests and use:
msleep (SETTLE_TIME);
# Building tests in Windows
Install CMAKE
CMD> CMAKE libzmq/tests
CMD> tests.sln
CMD> # build all projects in the solution
This diff is collapsed.
Click to expand it.
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