| 20 Nov 2025 |
just1602 | In the lix codebase, what is the best way to print a compile time warning? | 15:19:35 |
Qyriad | just1602 printTaggedWarning or printWarning | 15:50:28 |
just1602 | But they only show up at runtime, and not at compile time. At least when I do just build I don't see those warning show up in the build log. | 15:57:02 |
Qyriad | oh you mean compilation of Lix itself? | 16:09:19 |
Qyriad | well there's #pragma warning, but for anything more complex you'll have to write a clang-tidy lint. luckily there are already clang-tidy lints in the codebase you can look at | 16:10:09 |
just1602 | I'll try #pragma warning, it's just for a one off. It's we print a deprecation warning at runtime, and eldritch horrors want a compile time warning when we hit the version we target for the removal | 16:12:30 |
just1602 | Qyriad: ok, #pragma message seems to do what I was looking for, #pragma warning was just giving an error that warning wasn't a valid pragma instead of displaying the text | 16:18:24 |
just1602 | Now I just need to know that is the value format of LIX_MAJOR to be able to do # if LIX_MAJOR >= 2.96 ? :D | 16:18:59 |
just1602 | Is it 2_96, 296, some other format? | 16:19:23 |