discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] OOT Module Template Expansion Issues


From: Martin Braun
Subject: Re: [Discuss-gnuradio] OOT Module Template Expansion Issues
Date: Thu, 24 Mar 2016 17:05:42 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0

The short answer is, the templated in-tree stuff has access to some
modules we don't actually export to OOTs. You'll need to copy the
template infrastructure into your OOT.

Cheers,
Martin

On 03/24/2016 11:25 AM, Jacob Gilbert wrote:
> I am attempting to add several templatized blocks to an OOT module and
> am having trouble with getting things to build correctly.
> 
> After using modtool to add the new block, adding the .t extensions to
> the impl.cc/imp.h/.h <http://impl.cc/imp.h/.h> files, and adding test
> code, I added the following to ../lib/CMakeLists.txt:
> 
> 
>     include(GrMiscUtils)
>     GR_EXPAND_X_CC_H(testmod testblock_X_impl              c f i s b)
> 
>     ...
> 
>     list(APPEND testmod_sources
>         ${generated_sources}
>         <other block sources...>
> 
> 
> and the following to ../include/testmod/CMakeLists.txt:
> 
> 
>     include(GrMiscUtils)
>     GR_EXPAND_X_H(testmod testblock_X              c f i s b)
> 
>     add_custom_target(testmod_generated_includes DEPENDS
>         ${generated_includes}
>     )
> 
>     ...
> 
>     install(FILES
>         ${generated_includes}
> 
>         <other header files...>
> 
> 
> 
> These were borrowed from in-tree templates like fir_filter_XXX; I was
> unable to find an OOT module using templates. I also added appropriate
> #include, %include, and GR_SWIG_BLOCK_MAGIC2 to swig/testmod_swig.i for
> each of the generated blocks. However, when I attempt to build I get the
> following error:
> 
>       File
>     "/home/jacob/gr-testmod/build/include/testmod/generate_helper.py",
>     line 9, in <module>
>         import build_utils
>     ImportError: No module named build_utils
> 
> 
> 
> This obviously does not happen to in-tree modules. I attempted to modify
> the gr-testmod/cmake/Modules/GrMiscUtils.cmake file where the
> GR_EXPAND_.X..() macros are defined to explicitly include the
> appropriate path, however it appears that by default the include
> statement I am using actually uses the GrMiscUtils.cmake installed with
> gnuradio (into /usr/local/lib/cmake/gnuradio/ in my case). If I modify
> the used GR_EXPAND_X... macros and manually add the correct path
> (sys.path.append('${CMAKE_CURRENT_SOURCE_DIR}/../python') or
> '../../python' in the case of the include macro), expansion works
> correctly, however this makes the code very un-portable. 
> 
> Given my elementary understand of CMake, I have no idea what I am doing
> incorrectly, or what changes if any should be made to modtool, but I was
> unable to find any other documents on how to go about doing this.
> 
> Thanks,
> Jacob
> 
> 
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
> 




reply via email to

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