1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-15 20:46:37 +08:00

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
This commit is contained in:
Jennifer Green
2020-04-22 10:54:24 -06:00
committed by Brad King
parent 615129f3eb
commit 4ab0d37b41

View File

@@ -28,6 +28,8 @@ function(cm_check_cxx_feature name)
string(REGEX REPLACE "[^\n]*warning:[^\n]*object file compiled with -mlong-branch which is no longer needed[^\n]*" "" check_output "${check_output}")
# Filter out other warnings unrelated to feature checks.
string(REGEX REPLACE "[^\n]*warning:[^\n]*sprintf\\(\\) is often misused, please use snprintf[^\n]*" "" check_output "${check_output}")
# Filter out libhugetlbfs warnings.
string(REGEX REPLACE "[^\n]*libhugetlbfs [^\n]*: WARNING[^\n]*" "" check_output "${check_output}")
# Filter out xcodebuild warnings.
string(REGEX REPLACE "[^\n]* xcodebuild\\[[0-9]*:[0-9]*\\] warning: [^\n]*" "" check_output "${check_output}")
# Filter out ld warnings.