To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/57596E6532C9F54F9DF09BCDFE7B1D3AC038A782%40exmbx06-cdc.nexus.csiro.au.
Hello all,
In my project I use some additional, non-MOOSE c++ files and I want to add the compiler flag -Wc++11-extensions to the Makefile to suppress some warning messages I always get when compiling. However, I don't really understand what the auto generated Makefile is doing or where to put any additional flags.
Can I add a specific flag in the Makefile for a sub-directory of files? Where and how do I accomplish that in the Makefile?
--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users...@googlegroups.com.
Visit this group at http://groups.google.com/group/moose-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/CANj%2BmwD24Ho_eRu_GfgH4GOyimMPxrZA%2BET86zCrifhs--NDgQ%40mail.gmail.com.
I figured it out myself. Here is what you do...
Open the Makefile under your project. Go under the "# dep apps" sub-header of the "MODULES" header. Add the following lines after "APPLICATION_NAME", each on a new line...
export EXTERNAL_FLAGS += -your -flags -go -here
export libmesh_CXXFLAGS += -your -flags -go -here
NOTE: That you need to duplicate your flags for both arguments, so you could create a dummy variable holding your flags and do the following...
DUMMY = -your -flags -go -here
export EXTERNAL_FLAGS += $(DUMMY)
export libmesh_CXXFLAGS += $(DUMMY)
Either way should work. It works for me, but I had to dig around through the MOOSE framework to figure this out.