File tree Expand file tree Collapse file tree 3 files changed +17
-0
lines changed Expand file tree Collapse file tree 3 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,16 @@ set(GC_LIB_SOURCES CACHE INTERNAL "The graph_compiler library source paths")
41
41
set (GC_LIB_INCLUDES CACHE INTERNAL "The graph_compiler library include paths" )
42
42
43
43
add_definitions (${LLVM_DEFINITIONS} )
44
+
45
+ set (GC_MLIR_CXX_FLAGS "" )
46
+ # Silence a false positive GCC -Wunused-but-set-parameter warning in constexpr
47
+ # cases, by marking SelectedCase as used. See
48
+ # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85827 for details. The issue is
49
+ # fixed in GCC 10.
50
+ if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "10.0" )
51
+ check_cxx_compiler_flag ("-Wno-unused-but-set-parameter" CXX_SUPPORTS_WNO_UNUSED_BUT_SET_PARAMETER )
52
+ append_if (CXX_SUPPORTS_WNO_UNUSED_BUT_SET_PARAMETER "-Wno-unused-but-set-parameter" GC_MLIR_CXX_FLAGS )
53
+ endif ()
44
54
include ("cmake/version.cmake" )
45
55
46
56
add_subdirectory (include )
Original file line number Diff line number Diff line change
1
+ if (GC_MLIR_CXX_FLAGS )
2
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GC_MLIR_CXX_FLAGS} " )
3
+ endif ()
4
+
1
5
add_subdirectory (Dialect )
2
6
add_subdirectory (Transforms )
Original file line number Diff line number Diff line change @@ -3,6 +3,9 @@ if (NOT GC_TEST_ENABLE)
3
3
return ()
4
4
endif ()
5
5
6
+ if (GC_MLIR_CXX_FLAGS )
7
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GC_MLIR_CXX_FLAGS} " )
8
+ endif ()
6
9
add_definitions (-DMLIR_INCLUDE_TESTS )
7
10
add_custom_target (GCUnitTests )
8
11
set_target_properties (GCUnitTests PROPERTIES FOLDER "MLIR GC Tests" )
You can’t perform that action at this time.
0 commit comments