[USRP-users] ENABLE_RFNOC=ON question

Martin Braun martin.braun at ettus.com
Fri Feb 22 18:15:09 EST 2019


Rob,

yes, you can query UHD_RFNOC_FOUND. Check out this example:
https://github.com/EttusResearch/gr-ettus/blob/dcb780b77a114a265bb355fdba4f24033c3412c4/CMakeLists.txt#L138-L141

-- M

On Wed, Feb 20, 2019 at 8:52 AM Rob Kossler via USRP-users <
usrp-users at lists.ettus.com> wrote:

> Hi,
> I have an out-of-tree project with a CMakeLists.txt that contains the
> following code:
>
> if(ENABLE_RFNOC)
>   add_definitions(-DUHD_RFNOC_ENABLED)
>   add_executable(my_app my_app.cpp rfnoc_functions.cpp)
> else(ENABLE_RFNOC)
>   add_executable(my_app my_app.cpp)
> endif(ENABLE_RFNOC
>
> This works fine if I run the cmake command such as ...
>   cmake ../ -DENABLE_RFNOC=ON
>
> However, I am wondering if there is a better way to do it such that the
> user doesn't have to specify this option given that the user has already
> specified it when building UHD.  At the time I run the out-of-tree cmake,
> the environment variables have already been setup to find the appropriate
> UHD library which has already been compiled either with or without that
> option.
>
> Is it possible to find this information automatically rather than require
> the user to specify it again in the out-of-tree cmake?
>
> Rob
> _______________________________________________
> USRP-users mailing list
> USRP-users at lists.ettus.com
> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ettus.com/pipermail/usrp-users_lists.ettus.com/attachments/20190222/d1c9df83/attachment.html>


More information about the USRP-users mailing list