On Wed, 2 Oct 2019 at 10:23, Stuart Dootson <stuart.doot...@gmail.com> wrote:
> There's no problem with the tests per-se - the problem is that the sigc > dll is not in the same directory as the test executables. The DLL is in > <cmake-build-dir>/sigc++/<Debug/Release>, while the EXEs are in > <cmake-build-dir>/tests/<Debug/Release>. > > So, options are: > > 1. Change the PATH to include the DLL directory before running the tests > 2. Copy the DLL to the EXE directory as a post-build action - that can be > done with CMake, something like adding this bit of CMake to the function > add_sigcpp_test: > > add_custom_command( > TARGET ${test_name} > POST_BUILD > COMMAND ${CMAKE_COMMAND} -E copy > $<TARGET_FILE:sigc-${SIGCXX_API_VERSION}> > ${CMAKE_CURRENT_BINARY_DIR} > VERBATIM > ) > > 3. Build all targets (DLL & test executables) into the same output > directory with something like this bit of CMake: > if(MSVC) > set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) > endif() > > I ought to clarify that this should be added to the root CMakeList.txt, just after the "project (sigc++)" line. > Hope that's of some help... > > Stuart Dootson > > On Wed, 2 Oct 2019 at 07:56, Murray Cumming <murr...@murrayc.com> wrote: > >> On Sat, 2019-09-28 at 14:19 +0200, Murray Cumming wrote: >> [snip] >> > Maybe someone would like to create a PR to build with MSVC on Windows >> > too? See, for instance: >> > >> https://help.github.com/en/articles/virtual-environments-for-github-actions#supported-virtual-environments-and-hardware-resources >> >> >> I have had some success doing that myself, via the cmake build, but the >> tests currently fail: >> >> https://github.com/libsigcplusplus/libsigcplusplus/pull/31/checks >> >> Maybe someone could try to investigate this on an actual Windows >> system? >> >> -- >> Murray Cumming >> murr...@murrayc.com >> www.murrayc.com >> >> >> _______________________________________________ >> libsigc-list mailing list >> libsigc-list@gnome.org >> https://mail.gnome.org/mailman/listinfo/libsigc-list >> >
_______________________________________________ libsigc-list mailing list libsigc-list@gnome.org https://mail.gnome.org/mailman/listinfo/libsigc-list