Repository navigation
Use CMake target_compile_options and target_compile_definitions - #2248
Conversation
|
Note, even if this isn't solving the issue I was trying to solve, I like the use of |
efa1edd to
d74efae
Compare
ISSOtm
left a comment
There was a problem hiding this comment.
No, that is not breaking due to our -Werror=undef, it's CMake attempting to compile files internal to libstdc++ that aren't meant to be compiled stand-alone. Please leave the compile option logic as-is, but if you want to make formatting changes, I'll be happy to merge them :)
I'll investigate the CMake issue, but I think it's a CMake bug, not our fault.
…X_SCAN_FOR_MODULES OFF)`
…e_definitions(_CRT_SECURE_NO_WARNINGS)`
d74efae to
b1a3138
Compare
|
Thank you for testing on your own machine and narrowing the cause down to C++ modules! Glad it turned out to be a one-line fix. (Or workaround, since it's CMake's bug.) |
Follow-up to #2243. I'm attempting to use target-specific compile options/definitions for our warning/diagnostic flags after all, because they're sometimes interfering with CI builds. At least, the
unix (ubuntu-26.04-arm, g++, cmake)is inconsistently but repeatedly breaking due to our-Werror=undef:Example: https://github.com/gbdev/rgbds/actions/runs/44775063206/job/136439699907?pr=2247
(#2246 had the same failure yesterday until I re-ran it once or twice.)