Conversation
Add UNITTEST_CYGWIN directive and use it to: include Posix/TimeHelpers.h for Cygwin, exclude the signal handling in SignalTranslator.h/.cpp as Cygwin does not have the necessary Posix signal handling support, i.e. sigjmp_buf or siglongjmp. Reimplement SleepMs in TimeHelpers.cpp using C++11 rather than usleep as that is not present on Cygwin. Update CMakeLists.txt to exclude SignalTranslator.h/.cpp from the build.
|
I don't think the Travis failure is related to my changes. I checked out the current master branch ( bc5d87f) and I see a failure there like so: |
pjohnmeyer
left a comment
There was a problem hiding this comment.
@ptheta I'm not sure these changes are necessary. On Cygwin, just use the Win32 platform.
Happy to discuss? Also would need to make the changes C++98 compatible (for now).
| void TimeHelpers::SleepMs(int ms) | ||
| { | ||
| usleep(static_cast<useconds_t>(ms * 1000)); | ||
| std::this_thread::sleep_for(std::chrono::microseconds(ms * 1000)); |
There was a problem hiding this comment.
We can't use <chrono> in UnitTest++ at this time. UnitTest++ does not require a modern compiler.
Add UNITTEST_CYGWIN directive and use it to:
include Posix/TimeHelpers.h for Cygwin,
exclude the signal handling in SignalTranslator.h/.cpp as Cygwin does not have
the necessary Posix signal handling support, i.e. sigjmp_buf or siglongjmp.
Reimplement SleepMs in TimeHelpers.cpp using C++11 rather than usleep as that
is not present on Cygwin.
Update CMakeLists.txt to exclude SignalTranslator.h/.cpp from the build.