Commit Graph

37 Commits

Author SHA1 Message Date
Orgad Shaneh
ddcd1469e8 MSYS: Add support for running under MSYS runtime environment
Detect MSYS as CYGWIN, with the required adaptations.
2021-04-26 14:27:34 -04:00
Marc Chevrier
6cee4c6a8b Restore support for cross-compiling CMake itself
In commit eb583b0a66 (cmake_path command: path management, 2020-07-23,
v3.19.0-rc1~216^2~1) we added a `try_run`.  In cross-compilation mode,
C++ features tests must avoid running tests if there is no emulator
defined.
2021-01-18 12:23:23 -05:00
Anonymous Maarten
b756ec8a46 cm_cxx_features: Filter out MSBXXXX warnings
When building CMake in `%TMP%` on Windows, MSBuild issues warnings.
Filter those out to avoid breaking C++ feature checks.

Fixes: #21270
2020-10-08 09:24:02 -04:00
Marc Chevrier
eb583b0a66 cmake_path command: path management
Fixes: #19568, #20922
2020-09-06 10:52:25 +02:00
Marc Chevrier
d654bf3449 STL Support: Add cm::filesystem::path in <cm/filesystem> 2020-07-09 17:02:42 +02:00
Brad King
e776ff0582 Merge topic 'cm_cxx_features-icpc-10121'
231637eae2 cm_cxx_features: Filter out 'icpc: command line warning #10121'

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4698
2020-05-01 08:24:21 -04:00
Jennifer Kathleen Green
231637eae2 cm_cxx_features: Filter out 'icpc: command line warning #10121'
This warning appears for:

    overriding '-xCORE-AVX2' with '-march=haswell'`

in some Cray environments.

Fixes: #20664
2020-04-30 13:27:59 -04:00
Brad King
5aa1ef1df8 Merge topic 'cm_cxx_features-libhugetlbfs'
4ab0d37b41 cm_cxx_features: Filter out libhugetlbfs warnings

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4681
2020-04-30 09:52:12 -04:00
Jennifer Green
4ab0d37b41 cm_cxx_features: Filter out libhugetlbfs warnings
Without this, CMake fails to build on Cray systems with a
craype-hugepages modulefile loaded on the front-end due to libhugetlbfs
warnings breaking the CXX Feature tests.  Filter out the warnings so the
bootstrap can proceed to successfully install CMake on Cray Linux
systems.

Fixes: #20645
2020-04-29 08:08:59 -04:00
Raul Tambre
e758331595 cm_cxx_features: Remove CUDA installation warning filtering
This has been fixed in upstream LLVM. No released version contains this issue.
d32170dbd5
eb2ba2ea95
2020-04-01 10:34:35 +03:00
Raul Tambre
6ebc6cec41 cm_cxx_features: Filter out CUDA installation warnings
Clang always outputs these if it doesn't recognize the installed CUDA version.
They don't affect compiling C++.

Fixes #20434.
2020-03-09 09:17:41 -04:00
Marcus Calhoun-Lopez
ee28580c33 C++ feature checks: Ignore linker warnings 2019-11-25 13:14:57 -07:00
Alex Turbov
7b2dd9dedc
Refactor: Use added message types in various modules
Co-Authored-By: Craig Scott <craig.scott@crascit.com>
2019-11-02 14:10:09 +02:00
Brad King
4ca5a815f2 C++ feature checks: Match warnings more strictly
Require the word "warning" to appear at the start of a line, after
whitespace, or after a `:`.  This is the same that CTest launchers use
to match warnings.  It avoids matching "warning" inside file paths.

Fixes: #19019
2019-03-07 14:55:54 -05:00
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