-
Karl Lenz authored
This commit adds a new default build system for ipcalc, marking the existing GNU Makefile as "legacy", but not removing it entirely (at least not yet). The main benefits of Meson for this project are that it will automatically detect the presence of the maxminddb and geoip libraries on the system and use the best available one by default rather than just assuming that maxminddb is always available by default like the Makefile does, and that it makes cross-builds easier, particularly with dependencies. Normally a key benefit of Meson is that the configure times and build times are significantly reduced compared to most other build systems (with the possible exception of CMake with the Ninja backend, according to the official Meson documentation), but while that is technically true for this project as well, since ipcalc is such a relatively small application, the reduced build time is fairly negligible. This commit also restructures the ipcalc unit tests, defining them all in one file (tests/meson.build) and grouping them by the feature that they are testing to hopefully make them a little bit easier to maintain. This could have been done with the old Makefile instead - nothing about Meson is technically required for the restructured unit tests - but it made sense to do while introducing the new Meson build system for ipcalc because it allows the 'meson test` utility to differentiate between individual tests, summarize the passed/failed test results, run all tests in parallel (making a full test run nearly instantaneous), and allow a developer to run only specific tests while debugging. Signed-off-by: Karl Lenz <xorangekiller@gmail.com>
Karl Lenz authoredThis commit adds a new default build system for ipcalc, marking the existing GNU Makefile as "legacy", but not removing it entirely (at least not yet). The main benefits of Meson for this project are that it will automatically detect the presence of the maxminddb and geoip libraries on the system and use the best available one by default rather than just assuming that maxminddb is always available by default like the Makefile does, and that it makes cross-builds easier, particularly with dependencies. Normally a key benefit of Meson is that the configure times and build times are significantly reduced compared to most other build systems (with the possible exception of CMake with the Ninja backend, according to the official Meson documentation), but while that is technically true for this project as well, since ipcalc is such a relatively small application, the reduced build time is fairly negligible. This commit also restructures the ipcalc unit tests, defining them all in one file (tests/meson.build) and grouping them by the feature that they are testing to hopefully make them a little bit easier to maintain. This could have been done with the old Makefile instead - nothing about Meson is technically required for the restructured unit tests - but it made sense to do while introducing the new Meson build system for ipcalc because it allows the 'meson test` utility to differentiate between individual tests, summarize the passed/failed test results, run all tests in parallel (making a full test run nearly instantaneous), and allow a developer to run only specific tests while debugging. Signed-off-by: Karl Lenz <xorangekiller@gmail.com>
Loading