[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] VS2015/MinGW fixes and test workarounds

I was unsure whether to include this as a multiple smaller patches,
but I've been working on some issues I've faced within Windows

List of Changes:

- Workaround for UAC elevation causing test failures

Windows UAC automatically elevates executables with special keywords
in their name. [1] As a workaround for failing test cases on Windows,
the executables generated from the test sources containing "setup" in
their name were renamed to "set_up." An alternative for investigation
is to somehow generate manifest files as shown in the link.

[1] http://blogs.msdn.com/b/helloworld/archive/2007/09/15/why-does-my-application-requires-an-elevated-privilege.aspx

- MinGW DLL Prefix Workaround

CMake seems to assign "lib" as the prefix to shared libraries on MinGW
GCC, but it seems that MinGW does not expect such a prefix when
linking to DLLs. [2] By setting, CMAKE_SHARED_LIBRARY_PREFIX to "" the
example tests were able to run with the exception of the
calculator_test which segfaults (SIGSEGV) on the setjmp in
test_divide_by_zero. This fault is specific to MinGW and does not
occur within runs on Cygwin or Visual Studio.

[2] http://www.mingw.org/wiki/specify_the_libraries_for_the_linker_to_use

- VS2015 Support

Visual Studio now includes support for vsnprintf and snprintf but does
so as an inline functions. check_symbol_exists is used to check for
its existence within stdio. [3] All tests are passing when run from
within the IDE or via NMake. Command line builds via msbuild seem to
error for the first few example tests.

[3] https://cmake.org/Bug/view.php?id=15772

Attachment: windows_fixes.patch
Description: Binary data