[ccan] Annoying warning, a.k.a. how to add to CFLAGS

Rusty Russell rusty at rustcorp.com.au
Mon Sep 4 10:57:58 AEST 2017


Ian Zimmerman <itz at very.loosely.org> writes:
> When I checkout current master, run ./tools/configurator/configurator >
> config.h and then make, I get exactly 1 warning for the whole thing:
>
> ccan/strgrp/strgrp.c: In function ‘grp_for’:
> ccan/strgrp/strgrp.c:296:0: warning: ignoring #pragma omp parallel [-Wunknown-pragmas]
>      #pragma omp parallel for schedule(dynamic)
>
> I figured out that I can silence that by adding -fopenmp to my CFLAGS.
> But how to do that permanently?  I don't want to specify that on the
> command line every time, and I also don't want to set it in the
> environment because sometimes I compile other things than ccan ;-)

Hmm, well, if you're compiling strgrp, you should be adding CFLAGS
from _info, which sets this correctly.

In this case, we could just test defined(_OPENMP) instead of
HAVE_OPENMP, though, which would automagically work.

Module author CC'd

Cheers,
Rusty.





More information about the ccan mailing list