diff --git a/CMakePresets.json b/CMakePresets.json index 4dd516b3..810cbe7b 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -43,6 +43,22 @@ "rhs": "" } }, + { + "name": "default-mlir", + "displayName": "default with MLIR", + "inherits": "default", + "cacheVariables": { + "CXX_ENABLE_MLIR": "YES" + } + }, + { + "name": "debug-mlir", + "displayName": "debug with MLIR", + "inherits": "debug", + "cacheVariables": { + "CXX_ENABLE_MLIR": "YES" + } + }, { "name": "emscripten-mlir", "displayName": "emscripten with MLIR", diff --git a/src/mlir/cxx/mlir/CMakeLists.txt b/src/mlir/cxx/mlir/CMakeLists.txt index 4f159df8..e1d12fc1 100644 --- a/src/mlir/cxx/mlir/CMakeLists.txt +++ b/src/mlir/cxx/mlir/CMakeLists.txt @@ -26,9 +26,9 @@ target_compile_definitions(cxx-mlir PUBLIC CXX_WITH_MLIR) add_dependencies(cxx-mlir MLIRCxxOpsIncGen) if (CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU") + target_compile_options(cxx-mlir PRIVATE - -Wno-unused-variable - -Wno-covered-switch-default - -Wno-unused-but-set-variable + $<$:-Wno-all -Wno-extra -Wno-covered-switch-default> ) + endif() diff --git a/src/mlir/cxx/mlir/cxx_dialect.h b/src/mlir/cxx/mlir/cxx_dialect.h index 68bbcd4b..b6dc72d4 100644 --- a/src/mlir/cxx/mlir/cxx_dialect.h +++ b/src/mlir/cxx/mlir/cxx_dialect.h @@ -20,8 +20,17 @@ #pragma once +#if defined(__clang__) || defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif + #include +#if defined(__clang__) || defined(__GNUC__) +#pragma GCC diagnostic pop +#endif + #include #define GET_TYPEDEF_CLASSES