Conversation
| set(ONLY_FREE $<IF:$<BOOL:USE_NONFREE_TESTS>,,--only-free>) | ||
| set(ONLY_INTERNAL $<IF:$<BOOL:USE_EXTERNAL_TESTS>,,--only-internal>) | ||
| set(OS_NAME "$<IF:$<STREQUAL:${TESTS_OS_NAME},>,,--os;${TESTS_OS_NAME}>") |
There was a problem hiding this comment.
That's some abstruse ternary syntax, but sure.
There was a problem hiding this comment.
Actually, it might be breaking in FreeBSD?
Run command: bash -c 'cd /home/runner/work/rgbds/rgbds/test; ./fetch-test-deps.sh $<IF:$<BOOL:USE_NONFREE_TESTS>,,--only-free> $<IF:$<BOOL:USE_EXTERNAL_TESTS>,,--only-internal>'
bash: -c: line 1: syntax error near unexpected token `newline'
bash: -c: line 1: `cd /home/runner/work/rgbds/rgbds/test; ./fetch-test-deps.sh $<IF:$<BOOL:USE_NONFREE_TESTS>,,--only-free> $<IF:$<BOOL:USE_EXTERNAL_TESTS>,,--only-internal>'
Problem running command: bash -c 'cd /home/runner/work/rgbds/rgbds/test; ./fetch-test-deps.sh $<IF:$<BOOL:USE_NONFREE_TESTS>,,--only-free> $<IF:$<BOOL:USE_EXTERNAL_TESTS>,,--only-internal>'
Problem executing pre-test command(s).
Errors while running CTest
I'd be fine with using ordinary ifs here.
There was a problem hiding this comment.
I agree this ternary synax looks a little icky, but I was trying to avoid five lines of conditional logic per option here, for readability. Tradeoffs tradeoffs...
| add_compile_options( | ||
| /MP # Build multiple files in parallel. | ||
| /wd5105 # MSVC's own standard library triggers warning C5105, "macro expansion producing 'defined' has undefined behavior". | ||
| /wd5030 # Warning C5030 is about unknown attributes (`[[gnu::ATTR]]`), none of ours being load-bearing. | ||
| /wd4996 # Warning C4996 is about using POSIX names, which we want to do for portability. | ||
| /Zc:preprocessor # Opt into the C++20-conformant preprocessor. | ||
| ) |
There was a problem hiding this comment.
These are long enough that they could be header-style not inline-style (like the comment on -Wno-gnu-zero-variadic-macro-arguments below):
| add_compile_options( | |
| /MP # Build multiple files in parallel. | |
| /wd5105 # MSVC's own standard library triggers warning C5105, "macro expansion producing 'defined' has undefined behavior". | |
| /wd5030 # Warning C5030 is about unknown attributes (`[[gnu::ATTR]]`), none of ours being load-bearing. | |
| /wd4996 # Warning C4996 is about using POSIX names, which we want to do for portability. | |
| /Zc:preprocessor # Opt into the C++20-conformant preprocessor. | |
| ) | |
| add_compile_options( | |
| # Build multiple files in parallel | |
| /MP | |
| # MSVC's own standard library triggers warning C5105, | |
| # "macro expansion producing 'defined' has undefined behavior" | |
| /wd5105 | |
| # Warning C5030 is about unknown attributes (`[[gnu::ATTR]]`), | |
| # none of ours being load-bearing. | |
| /wd5030 | |
| # Warning C4996 is about using POSIX names, | |
| # which we want to do for portability. | |
| /wd4996 | |
| # Opt into the C++20-conformant preprocessor. | |
| /Zc:preprocessor | |
| ) |
There was a problem hiding this comment.
Since the CMakeLists is quite long, I was trying to keep it more compact. But if you think that this is nonetheless better, I'd be fine with you committing this.
ede1f65 to
31637e3
Compare
Also bump it to the version I just tested it with
This can help bring attention to the MSVC difference (no UBSan there)
Turns out the status messages use 3.17
We can use them now that the minimum version has been bumped
Also switch to heredoc syntax for ease of editing
Make the common files into an object library, which lets them be compiled only once (saving 41 build steps) This also lends itself well to removing the per-program loop, which simplifies the code somewhat.
Hopefully Microsoft fixed their stuff by now, riiiight?
31637e3 to
0c713db
Compare
Also bump it to the version I just tested it with