Re: [sigc] Using GitHub Actions (MSVC build)



On Mon, 2019-10-07 at 12:01 +0100, Stuart Dootson wrote:
From some quick Googling, it looks like the best/easiest way to alter
the PATH for the test environment is to use "cmake -E env" as an
intermediate executor that sets the environment for your test
executable, and using CMake generator expressions to retrieve the
correct file & directory paths for the targets involved. This yields
the following add_test command:

  add_test (NAME ${test_name}
      COMMAND ${CMAKE_COMMAND} -E env "PATH=$<TARGET_FILE_DIR:sigc-
${SIGCXX_API_VERSION}>;$ENV{PATH}" $<TARGET_FILE:${test_name}>)

I've implemented that & tested it (seems to work - the tests all
pass) on my Windows machine & pushed the commit to a fork of
libsigc++ @ 
https://github.com/studoot/libsigcplusplus/commit/2a332883d6ee20970d965b0907ca04fc1e2f1289
. I also tried making a test deliberately fail & that was detected as
well, so it looks like tests are executed correctly.

Many thanks for that. I have now merged the pull request with a version
of that commit. So now any libsigc++ commit will get some testing with
MSVC too.

If you happen to know how to turn on warnings-as-errors in the
CMake/MSVC build, and maybe how to turn on some more warnings, we might
get something useful from MSVC. Please do create a Pull Request if you
figure that out. Thanks.

-- 
Murray Cumming
murrayc murrayc com
www.murrayc.com




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