{"author":"Viktor Szakats","author_email":"commit@vsz.me","author_time":1744617030,"commit_time":1744659099,"committer":"Viktor Szakats","committer_email":"commit@vsz.me","hash":"e86542038dda88dadf8959584e803895f979310c","message":"cmake: prefer `COMPILE_OPTIONS` over `CMAKE_C_FLAGS` for custom C options\n\nAlso:\n- pass `-D_GNU_SOURCE` via `COMPILE_DEFINITIONS`.\n- make it explicit to pass these C flags to feature checks.\n- update `_GNU_SOURCE` comment with `pipe2()`.\n- enable `-pedantic-errors` picky option for GCC with CMake <3.23.\n- drop redundant condition when stripping existing MSVC `/Wn` options.\n\nCMake passes `CMAKE_C_FLAGS` to targets, feature checks and raw\n`try_compile()` calls. With `COMPILE_OPTIONS`, this is limited to\ntargets, and we must explicitly pass them to feature checks. This\nmakes the build logic clearer, and offers more control. It also\nreduces log noise by omitting these options from linker commands,\nand from `CMAKE_C_FLAGS` dumps in feature checks.\n\nCloses #17047\n","parents":["d9ca7ad5cb036c429faca2af81be8c8cbc332236"],"tree_hash":"fbae9319904e537d990d78649e3f34a53b997b9f"}