Opening this generic issue to track how some commands from old Makefiles can be done when using the new CMake-based build system, or what the possible alternatives. Hopefully we can build some knowledge here that can be then transferred to the wiki cmake tutorials.
### Compiling core only
With the old makefiles, the `make` compiled only the core of Kamailio. With cmake, `make` compiles everything.
Would it be possible to have a command with cmake that compiles only the core? Like:
``` make core ```
Or maybe there is a way to do it already?!?
### Compile a single module
With the old makefiles, compiling a single module, say acc, was possible with:
``` make modules modules=src/modules/acc ```
With cmake, this is possible with:
``` make acc ```
Hey @miconda,
This tracking would be great and also help to identify what docs should include as well.
For the core compilation, there is a target called `kamailio`. it seems a bit counter intuitive but i can create an alias for it be called `core`.
@miconda I can see there is a target called `static` using the old Makefiles. Do we know the purpose of it or what and why is built statically?
Invoking it `make static` seems to compile the core but I can't seem to find any differences with just `make`. Do we want to include it in the cmake targets?
I am fine also with `make kamailio`, just that I was not aware of. Maybe it would be better to create a table with corresponding commands between old makefiles and cmake build systems.
I don't think we need `static` target anymore, never used it and I am not even sure why was added in the first place, probably to be able to compile kamailio with some modules linked directly, for cases when loading shared library/objects was not possible on some OSes very long time ago...
Created a wiki page to collect equivalent/similar commands:
- https://github.com/kamailio/kamailio/issues/4052
I am not sure if using a table is the best formatting, the long commands are wrapped inside cells, but it should still work to copy&paste.
I noticed that now the `make` in `build` folder after `cmake ..` is executing the targets to generate the doc readmes for modules.
Can this be disabled, so the doc readmes are generated only when executing a specific target for `make`?
Anyhow the readmes are generated on server now, locally should be done only when one wants to test how the file changed after updating the xml files, but not push to git repo.
Yeah of course, that is the change that broke the cmake building for some reason. i just assumed that everything should be included in the make all. i will reverse it tomorrow, it's the ALL argument in the `add_custom_target(kamaillio_docs)` command. If we remove it, one will need to explicitly call make kamailio_docs to build them.
Why it errors now, i dont know. maybe its the missing deps like xsltproc on the vm that builds them. didn't figure out yet!
This issue is stale because it has been open 6 weeks with no activity. Remove stale label or comment or this will be closed in 2 weeks.
I think this can be also now closed? Or is there still something open.