I am not yet familiar with CMake and was not sure what/where can be done.
For example, afterwards, by testing I could figure out that the CMakeList.txt for (many) modules can be more or less the same, like a template. For `acc` module, I could get:
```
set(MODNAME acc)
file(GLOB ${MODNAME}_SRC "*.c")
add_library(${MODNAME} SHARED ${${MODNAME}_SRC})
target_compile_options(${MODNAME} PUBLIC "-ffile-prefix-map=${CMAKE_SOURCE_DIR}/src/modules/${MODNAME}/=")
```
First line is different per module, setting the module name, but there might be already available a CMake variable with the module name (in your comment you use `${MODULE_NAME}`). So, the CMakeList.txt in the module folder can include a common-template file.
On the other hand, I am not sure if using too many variables will slow down compilation, because of too many times expanding the vars.
Anyhow, feel free to update/optimize as you consider to be better. I am mostly trying to figure out solutions for what I see it is different, without adding more load on your shoulders. It might not be the best, so it can be updated. If I get stuck with something I will get it to you.
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/commit/28f4089efcc9c2ccf8c79fc9ecc509a…
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/commit/28f4089efcc9c2ccf8c79fc9ecc509ae29d873e5/150201533(a)github.com>
From https://github.com/kamailio/kamailio/actions/runs/12265962282
```
CC (gcc) [M db_sqlite.so] dbase.o
dbase.c: In function 'db_sqlite_close':
dbase.c:157:25: error: passing argument 2 of 'db_do_close' from incompatible pointer type [-Wincompatible-pointer-types]
157 | db_do_close(_h, db_sqlite_free_connection);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
| |
| void (*)(struct sqlite_connection *)
In file included from ../../lib/srdb1/db_ut.h:37,
from dbase.c:28:
../../lib/srdb1/db.h:495:40: note: expected 'void (*)(struct pool_con *)' but argument is of type 'void (*)(struct sqlite_connection *)'
495 | void db_do_close(db1_con_t *_h, void (*free_connection)(struct pool_con *));
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [../../Makefile.rules:100: dbase.o] Error 1
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4064
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4064(a)github.com>