cmake/cmake-3.27.9-fix-cxx-standard-check-issue.patch
tiberium b9fa0dba36 fix cmake compile issue due to cxx standard check failed
(cherry picked from commit 83f6533e84d6ed6d66cbb605120a9660564b5c46)
2024-04-15 09:52:08 +08:00

14 lines
1.0 KiB
Diff

diff --git a/Source/Checks/cm_cxx_features.cmake b/Source/Checks/cm_cxx_features.cmake
index 02627464..4f6ccdaf 100644
--- a/Source/Checks/cm_cxx_features.cmake
+++ b/Source/Checks/cm_cxx_features.cmake
@@ -44,6 +44,8 @@ function(cm_check_cxx_feature name)
string(REGEX REPLACE "[^\n]*warning D[0-9][0-9][0-9][0-9][^\n]*" "" check_output "${check_output}")
# Filter out warnings caused by user flags.
string(REGEX REPLACE "[^\n]*warning:[^\n]*-Winvalid-command-line-argument[^\n]*" "" check_output "${check_output}")
+ # Filter out clang output warnings
+ string(REGEX REPLACE "[^\n]*warning:[^\n]*-Wunused-command-line-argument[^\n]*" "" check_output "${check_output}")
# Filter out warnings caused by local configuration.
string(REGEX REPLACE "[^\n]*warning:[^\n]*directory not found for option[^\n]*" "" check_output "${check_output}")
string(REGEX REPLACE "[^\n]*warning:[^\n]*object file compiled with -mlong-branch which is no longer needed[^\n]*" "" check_output "${check_output}")