Turn off warning as error and add header search path.

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Turn off warning as error and add header search path.

Postby Avadhesh » Wed May 06, 2020 6:56 am

Hi,
We are trying to build cef locally, with some additional source code and headers. This additional source code is not warning free and will take lot of effort to make it warning free. Meanwhile I looked at "/chromium_git/chromium/src/build/config/mac/BUILD.gn" file and found the flag "treat_warnings_as_errors". When I set this flag to false, my source is getting compiled.
But I need help with 2 things
1. How can I override this flag in cef's BUILD.gn "chromium/src/cef/BUILD.gn"?
2. How can I set header search path in cef's BUILD.gn?
Thanks,
Avadhesh
Avadhesh
Newbie
 
Posts: 1
Joined: Wed May 06, 2020 5:48 am

Re: Turn off warning as error and add header search path.

Postby magreenblatt » Wed May 06, 2020 12:00 pm

Avadhesh wrote:How can I override this flag in cef's BUILD.gn "chromium/src/cef/BUILD.gn"?

GN flags are global to the configuration and cannot be set per-target. Instead, you should look at what that flag does (e.g. modify cflags and ldflags) and then create a source_set for your files that does the same thing.

Avadhesh wrote:How can I set header search path in cef's BUILD.gn?

You can add include_dirs to the source_set that you defined for your files.

Also, I suggest that you think about how you will update your changes as the CEF code changes so that you are not stuck always using an old CEF version.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 105 guests