[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] Testers needed: Updated CMake syntax

From: Andrej Rode
Subject: [Discuss-gnuradio] Testers needed: Updated CMake syntax
Date: Thu, 14 Feb 2019 11:21:19 +0100

Hi all, 

in the last weeks I have been pursuing the quest of reworking the
current CMake build tooling in GNU Radio to use "modern CMake" syntax.
This work has mainly completed and now is the time to fix bugs you

The work on the updated CMake can be found here
[0]/[1] and should compile just fine using the cmake & make/ninja
commands you are used to. 
Support for static libraries might be still broken, but static linking
can be enabled using `-DBUILD_SHARED_LIBS=OFF` on the command line. No
shared library will be built using that flag.

Linking Out-of-Tree modules should be way easier using the new syntax
(but still old modules have to be updated). Mainly the `find_package`
call now follows the convention of specifying components in the
function call e.g. `find_package(Gnuradio COMPONENTS fft audio)`. After
the correct components are specified on in the `find_package` call the
corresponding build targets are available in your CMake project.  e.g.
you can `target_link_libraries(foo gnuradio::gnuradio-fft)`. Several
core build targets are always available (gnuradio::gnuradio-runtime,

Instead of linking to all GNU Radio libraries in the
`target_link_libraries` call in `lib/CMakeLists.txt` now only the
targets needed should be linked with. An example for changes needed in
a OOT can be found at [2].
Mostly removing almost everything from `cmake/Modules` and removing a
lot of manual dependency finding from your own `CMakeLists.txt` is a
good step forward.
Necessary changes to `gr_modtool` have been incorporated to work with
the new CMake syntax.

If you encounter bugs or have suggestions for further improvements do
not hesitate to contact me through the pull request [0] or email. I'll
help with build problems updating your OOT as well.


[0] https://github.com/gnuradio/gnuradio/pull/2230
[1] https://github.com/noc0lour/gnuradio/tree/update_cmake
[2] https://github.com/noc0lour/gr-grnet/tree/3.8

Attachment: pgp7jc1dOo1ln.pgp
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]