Skip to content

Enable warning flags on Mac builds of MFEM#2

Merged
tzanio merged 9 commits intov2.0from
warnings-flags-tweak
Nov 6, 2021
Merged

Enable warning flags on Mac builds of MFEM#2
tzanio merged 9 commits intov2.0from
warnings-flags-tweak

Conversation

@v-dobrev
Copy link
Copy Markdown
Member

@v-dobrev v-dobrev commented Jun 4, 2021

Enable the -pedantic -Wall -Werror flags on Mac -- this matches Travis.

@v-dobrev v-dobrev requested review from adrienbernede and tzanio June 4, 2021 20:53
Comment thread build-mfem/action.yml
CPPFLAGS+=" -pedantic -Wall -Werror";
fi
fi
if [[ ${{ inputs.os }} != 'ubuntu-18.04' || \
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, this is what was done in travis, my bad.
However, do we really want this for the optim target too?
Also, maybe it is a good idea to keep this on the linux target, because macos resource is limited...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we really want this for the optim target too?

I don't think it hurts to add these flags for the opt build -- at least with clang (which is the compiler on mac). With gcc (on linux) adding these flags to the -O3 flag results in more warnings (compared to no optimization flags) that can be quite different from one version of gcc to another -- that's why the warning flags are disabled on linux with opt build.

Also, maybe it is a good idea to keep this on the linux target, because macos resource is limited...

Do you think adding these flags makes the compilation slower? I'd be surprised if there is any noticeable slowdown.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, I think we want this on mac because it catches issues that are not caught by gcc -- I noticed the difference with Travis because in one instance (#1492), Travis failed (due to warning failures on mac) while the github actions were clean.

@tzanio
Copy link
Copy Markdown
Member

tzanio commented Sep 2, 2021

What's the status of this @adrienbernede ?

@v-dobrev v-dobrev changed the base branch from master to v2.0 November 4, 2021 06:00
@v-dobrev v-dobrev requested a review from pazner November 4, 2021 06:10
Copy link
Copy Markdown
Member

@pazner pazner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable to me.

@v-dobrev
Copy link
Copy Markdown
Member Author

v-dobrev commented Nov 5, 2021

@tzanio, take another look at this, if you want, and merge it if you're okay with it.

@tzanio tzanio merged commit 212c5a3 into v2.0 Nov 6, 2021
@tzanio tzanio deleted the warnings-flags-tweak branch November 6, 2021 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants