Solution: Added integration with CTest to existing unit test framework
based on Catch. ctest -v returns list of run tests now.
Changes:
* downloading and using Catch cmake modules that `unit_tests
--list-test-names-only` for add_test internally
Currently cppzmq as relatively simple and header only library depends on rather
complex unit test framework googletest.
Current issues:
- Googletest requires downloading and building it every time on travis
as cache support is limited there
- Googletest build is signifficant with comparison to cppzmq unittests
total runtime
Solution: Port existing tests to Catch - header only C++ framework and
gain ~20% build speed up on travis.
Why Catch?
It is well know C++ header only testing framework. It works well, it is
being kept up to date and maintainers seem to pay attention to
community's comments and issues.
We can not use Catch2 currently as we still support pre-C++11 compilers.
Building and installing cppzmq brings googletest build artifacts to the
installation destination as well. For example someone building cppzmq
with:
```
cmake -DCMAKE_INSTALL_PREFIX=mydest .
cmake --build --target install
```
gets googletest headers and libraries in `mydest`.
Solution: remove googletest from install target
* Problem: Windows build broken because of multiple issues
Windows issues:
* missing includes files
Solution: added missing <memory> and <unordered_map>
Here <map> was replaced with <unordered_map> as there is no need for
sorted map.
* googletest fails because deprecation warning causing errors.
Solution: D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING option added.
* googletest fails because by default, new Visual Studio projects
link the C runtimes dynamically but Google Test links them statically.
Solution: gtest_force_shared_crt=ON option added.
Besides that adding appveyor.yml configuration to add Windows build to
CI in order to prevent accidental Windows build breakage.
For now only Debug configuration as Release requires more time to figure
out.
* Problem: Windows build takes too long
Solution: disabling tests and perf tools
* Problem: Windows unit_tests executable not finding lizmq dll.
Solution: copy libzmq dll to build bin directory.
* Problem: Windows build fails because wrong test path provided