discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Handling Hier Blocks in Build Process


From: Martin Braun
Subject: Re: [Discuss-gnuradio] Handling Hier Blocks in Build Process
Date: Tue, 05 Aug 2014 19:59:39 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

John,

in one of my OOTs I did just that; I had GRC hier blocks that were
compiled using grcc when running 'cmake'.

I put these lines into grc/CMakeLists.txt (I stored all the hier blocks
in grc/):


# Make sure to add them in a non-dependent order
list(APPEND grc_hier_blocks
    file1.grc
    # etc. list all grcs here
)

message("Compiling GRC hier blocks...")
foreach(grc_file ${grc_hier_blocks})
    message("Compiling " ${grc_file})
    execute_process(
        COMMAND grcc ${grc_file}
        WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
    )
endforeach(grc_file ${grc_hier_blocks})


A bit of a hack, but did the trick.

M


On 08/05/2014 07:06 PM, John Malsbury wrote:
> I'd like to keep a large number of hier blocks organized in the apps
> folder  (which may not be standard practice for GR). Ideally, I'd like
> to maintain *only* the GRC files with version control, but allow the
> build system to:
> 
>   * Compile the .grc files into python/xml files.
>   * Install the .py files into the same location as everything else so
>     they show up in the OOT module's namespace.  
>   * Do the same for .xml files for access to GRC.
>   * If there were a way to get around manually adding the resulting .py
>     file to __init__.py, that would be a nice-to-have feature so other
>     developers can easily add hier blocks to the module's namespace.
> 
> I was just wondering if someone could tell me if this was possible, has
> been done already, or might be an unreasonable thing to do for some
> reason.  (before I waste an afternoon).
> 
> -John
> 
> 
> 
> _______________________________________________
> 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]