Hey @space88man,
We had this discussion with @linuxmaniac as well. In https://github.com/kamailio/kamailio/issues/4053#issuecomment-2545146514, you can find a way to provide the `CFLAGS` and the `LDFLAGS`. In [Environment Variables for Languages](https://cmake.org/cmake/help/latest/manual/cmake-env-variables.7.html#id4%7C), you can find all the `ENV` flags that you can pass to `cmake`. These `FLAGS` are respected when called on the **first time** of `cmake` configuration. We can also define/modify [CMAKE_[LANG]_FLAGS](https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_FLAGS.html#variable:...) after the first time config phase.
Note though, this will initialize the `FLAGS` with your provided ones and append to them the project's one found in `target_compile_options`. Is this ok, or do you need to completely override them and only use whatever you provide?