[Mlir-commits] [mlir] [mlir] Allow CXX standard to be overridden (PR #112957)

Nikhil Kalra llvmlistbot at llvm.org
Fri Oct 18 12:08:07 PDT 2024


https://github.com/nikalra created https://github.com/llvm/llvm-project/pull/112957

MLIR previously hardcoded the CXX version to C++17. Updated to allow for the CXX version to be set by clients (mirrors other LLVM projects).

>From d8f991c9c454d4f60eb468e517c697ae84e04106 Mon Sep 17 00:00:00 2001
From: Nikhil Kalra <nikhil.kalra at gmail.com>
Date: Fri, 18 Oct 2024 12:06:54 -0700
Subject: [PATCH] [mlir] Allow CXX standard to be overridden

MLIR previously hardcoded the CXX version to C++17. Updated to allow for the CXX version to be set by clients (mirrors other LLVM projects).
---
 mlir/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mlir/CMakeLists.txt b/mlir/CMakeLists.txt
index c6d44908a1111d..350a8404783bba 100644
--- a/mlir/CMakeLists.txt
+++ b/mlir/CMakeLists.txt
@@ -16,7 +16,7 @@ endif()
 
 # Must go below project(..)
 include(GNUInstallDirs)
-set(CMAKE_CXX_STANDARD 17)
+set(CMAKE_CXX_STANDARD 17 CACHE STRING "C++ standard to conform to")
 
 if(MLIR_STANDALONE_BUILD)
   find_package(LLVM CONFIG REQUIRED)



More information about the Mlir-commits mailing list