Skip to content

Commit 1e2a487

Browse files
committed
[MLIR][CMake] Suppress -Wpass-failed warning
libstdc++15 makes use of an unroll pragma inside std::find_if(). This produces a warning if clang fails to unroll the loop. As this pragma is outside of our control, suppress the warning.
1 parent fd8adf3 commit 1e2a487

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

mlir/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,12 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
110110
endif()
111111
endif()
112112

113+
# libstdc++15 makes use of an unroll pragma inside std::find_if(). This
114+
# produces a warning if clang fails to unroll the loop. As this pragma is
115+
# outside of our control, suppress the warning.
116+
check_cxx_compiler_flag("-Wno-pass-failed" CXX_SUPPORTS_WNO_PASS_FAILED)
117+
append_if(CXX_SUPPORTS_WNO_PASS_FAILED "-Wno-pass-failed" CMAKE_CXX_FLAGS)
118+
113119
# Installing the headers and docs needs to depend on generating any public
114120
# tablegen'd targets.
115121
# mlir-generic-headers are dialect-independent.

0 commit comments

Comments
 (0)