Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing include in ReactionData.h #1000

Merged
merged 2 commits into from
Mar 25, 2021
Merged

Conversation

speth
Copy link
Member

@speth speth commented Mar 25, 2021

std::log is declared in <cmath>, which we usually include via ct_defs.h.

Fixes #999.

Changes proposed in this pull request

  • include ct_defs.h in ReactionData.h
  • Run the 'docs' CI build without using the precompiled header (chosen because it's the fastest CI job, so will be least impacted by the time cost of not using the PCH)

If applicable, fill in the issue number this pull request is fixing

Fixes #

Checklist

  • There is a clear use-case for this code change
  • The commit message has a short title & references relevant issues
  • Build passes (scons build & scons test) and unit tests address code coverage
  • The pull request is ready for review

@bryanwweber
Copy link
Member

Congrats on #1000! Any idea why CI didn't catch this?

@ischoegl
Copy link
Member

ischoegl commented Mar 25, 2021

🎉 for 1000 also! I ran into the same thing in #995 yesterday, see dfadf60. Absolutely no idea why CI didn't catch it ... Edit: updated my commit so it is consistent with this fix

ischoegl added a commit to ischoegl/cantera that referenced this pull request Mar 25, 2021
updated to be consistent with Cantera#1000
@speth
Copy link
Member Author

speth commented Mar 25, 2021

Oh, I think I have a guess as why this wouldn't show up in the CI. Did your build have the use of the precompiled header disabled for some reason? Without the precompiled header, this should have been an error on every platform, but the PCH automatically gives you <cmath> among other things. Maybe it's worth having one of the CI builds run without that option turned on.

@speth
Copy link
Member Author

speth commented Mar 25, 2021

I confirmed that building main with use_pch=n gives an error (Clang complains that std isn't defined, never mind std::log).

I modified the docs build to disable using the PCH. I don't want to do it on any of the other CI jobs because the PCH has a pretty significant effect on the build time.

@bryanwweber
Copy link
Member

Confirmed this fixed the issue for me. Thanks for the quick fix @speth!

@bryanwweber bryanwweber merged commit 99a0714 into Cantera:main Mar 25, 2021
@speth speth deleted the fix-999 branch March 25, 2021 18:07
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.

Compiling failure on Windows
3 participants