Re: [sigc] Using GitHub Actions (MSVC build)
- From: Stuart Dootson <stuart dootson gmail com>
- To: Murray Cumming <murrayc murrayc com>
- Cc: libsigc-list <libsigc-list gnome org>
- Subject: Re: [sigc] Using GitHub Actions (MSVC build)
- Date: Sat, 12 Oct 2019 18:54:41 +0100
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
I’ve done that in another CMake project - /W4 /WX are the required flags (MSVC’s /Wall is far too persnickety for anyone to use, IMO). I’ll do a PR for that.
Stuart
[
Date Prev][Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]