Commit Graph

23 Commits

Author SHA1 Message Date
Brad King
2ca89b5a69 C++ feature checks: Filter out libstdc++ sprintf warnings
On OpenBSD linking to `libstdc++` with GCC 6.4 always warns:

    warning: sprintf() is often misused, please use snprintf()

These do not affect the availability of C++ features we're checking,
so filter them out.

Fixes: #18602
2018-11-20 12:50:45 -05:00
Gregor Jasny
057ecb8f6f C++ feature checks: Ignore Xcode warnings 2018-06-19 10:56:50 -04:00
Brad King
2254b72061 C++ feature checks: Filter out warnings caused by local configuration
In some environments the linker produces warnings like

    warning: directory not found for option
    warning: object file compiled with -mlong-branch ...

These do not affect the availability of C++ features we're checking,
so filter them out.

Fixes: #17850, #17947
2018-04-30 09:18:15 -04:00
Brad King
b2f612a0fa Simplify CM_FALLTHROUGH implementation
Use the macro now provided by KWSys instead of using `try_compile`
checks.  It will no longer consider the `__attribute__((fallthrough))`
variant, but compilers that don't have one of the modern attributes
shouldn't warn about not using one anyway.
2017-11-30 09:50:39 -05:00
Brad King
b8018135b5 Use C++11 '= delete' instead of CM_EQ_DELETE
We now require C++11 support including `= delete`.  Drop use of
the old compatibility macro.
2017-09-28 09:50:18 -04:00
Brad King
9e0362caa1 Remove checks for auto_ptr that we no longer need
We no longer use `auto_ptr` at all, so drop the checks for it.
2017-09-27 09:04:31 -04:00
Brad King
71b65abca2 C++ feature checks: Filter out warnings caused by user flags
Filter out `-Winvalid-command-line-argument` warnings from Clang (that
can be caused by user-specified flags) so that they do not break our
checks for C++ feature availability.
2017-09-19 09:25:30 -04:00
Brad King
eb3abf8b2b C++ feature checks: Prepare for multiple check output filters 2017-09-19 09:22:54 -04:00
Brad King
4e14498f4f Drop now-unused definition of CM_OVERRIDE 2017-09-15 10:06:41 -04:00
Daniel Pfeifer
5962db4389 Use C++11 nullptr 2017-08-24 23:39:47 +02:00
Daniel Pfeifer
cbcfb79f9c Use C++11 unordered containers 2017-08-22 23:05:27 +02:00
Brad King
f44d9bcc8f C++ feature checks: Improve exclusion of "0 Warning(s)"
Simply matching "0 Warning" may match "10 Warning(s)".  Instead remove
the entire `    0 Warning(s)` content from the MSBuild output before
searching it for warnings.

Issue: #16942
2017-06-08 09:22:09 -04:00
Walter Gray
f4ce396254 C++ feature checks: Do not match "0 Warning(s)" as a warning
The change in commit v3.9.0-rc1~6^2~1 (C++ feature checks: check output
for '[Ww]arning', 2017-06-03) accidentally matches `0 Warning(s)` in the
output and always thinks a warning exists, thus failing all checks in
Visual Studio builds.

Fixes: #16942
2017-06-06 08:55:43 -04:00
Daniel Pfeifer
8d7b3ef5d4 Provide and use CM_FALLTHROUGH 2017-06-03 08:38:51 +02:00
Daniel Pfeifer
0068224fdd C++ feature checks: check output for '[Ww]arning' 2017-06-03 08:38:51 +02:00
Brad King
f74f01fe69 Check C++ features even without CMAKE_CXX_STANDARD for CMake itself
When using `CMake_NO_CXX_STANDARD` a user may still provide `-std=c++11`
or similar flags in `CMAKE_CXX_FLAGS`, so we should still check for the
available C++ features.
2017-05-19 09:22:38 -04:00
Daniel Pfeifer
5d1671324b cmConfigure: provide macros CM_EQ_DELETE and CM_DISABLE_COPY 2017-04-22 10:09:41 +02:00
Daniel Pfeifer
67480c05e3 Add a feature check to test availability of auto_ptr 2016-09-26 09:03:46 -04:00
Brad King
aa50cdac43 Check for availability of unique_ptr and make_unique when building CMake
Some code paths may find these useful if available.
2016-09-16 13:22:10 -04:00
Daniel Pfeifer
b4b73f56a2 cxx features: add check for nullptr 2016-06-27 23:24:39 +02:00
Daniel Pfeifer
5286110d6f cxx features: add check for override 2016-06-27 10:37:41 -04:00
Daniel Pfeifer
09aa2c9418 Use <unordered_set> where available 2016-06-27 10:37:40 -04:00
Daniel Pfeifer
ea5477e43d Make C++ feature checks extensible
Turn the feature check for cxx11_unordered_map into a function such that
we can use it for other features as well.  Drop the 11 suffix, as we may
want to check features from other standards.
2016-06-27 10:37:40 -04:00