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 a few bugs related to compile tests #313

Merged
merged 3 commits into from
May 4, 2016
Merged

Conversation

dean0x7d
Copy link
Contributor

@dean0x7d dean0x7d commented May 3, 2016

I noticed some compile test bugs while working on #312 (but these bugs aren't actually specific to Intel's compiler).

  1. In expect_compile and expect_compile_error the cache variable was not always unset because message(FATAL_ERROR) exits immediately. Even if a test was fixed it would appear broken until the cache was reset manually.
  2. The expected-to-fail FMT_STATIC_ASSERT test was failing for the wrong reason: missing macro instead of the actual static assert.
  3. If the main project was configured with a non-default compiler, find-package-test failed with linker errors because ctest --build-and-test would still use the system default.

The cache bug meant that a failed test would appear forever broken,
even if the proper fix was applied.
FMT_STATIC_ASSERT is defined in posix.h so expect_compile_error was
actually failing on a missing macro instead of the static assert.
The failure would happen when the main project was configured with
a compiler which is not the system default. The new configuration
was not forwarded to "ctest --build-and-test". This fixes it.
@vitaut vitaut merged commit 6825ac9 into fmtlib:master May 4, 2016
@vitaut
Copy link
Contributor

vitaut commented May 4, 2016

Great fixes, thanks!

@vitaut
Copy link
Contributor

vitaut commented Mar 21, 2019

@dean0x7d, could you please review the updated CONTIBUTING document, particularly the part about licensing, and let me know if you agree with it being applied both to your contributions to {fmt}? The library is likely to be relicensed (#1073) so I'm collecting approval from all earlier contributors.

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.

2 participants