[Mlir-commits] [mlir] e261519 - [mlir] Allow CXX standard to be	overridden (#112957)
    llvmlistbot at llvm.org 
    llvmlistbot at llvm.org
       
    Fri Oct 18 15:22:44 PDT 2024
    
    
  
Author: Nikhil Kalra
Date: 2024-10-18T15:22:39-07:00
New Revision: e26151913cbfeb52f3e16098707b5e5ddc413b17
URL: https://github.com/llvm/llvm-project/commit/e26151913cbfeb52f3e16098707b5e5ddc413b17
DIFF: https://github.com/llvm/llvm-project/commit/e26151913cbfeb52f3e16098707b5e5ddc413b17.diff
LOG: [mlir] Allow CXX standard to be overridden (#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).
Added: 
    
Modified: 
    mlir/CMakeLists.txt
Removed: 
    
################################################################################
diff  --git a/mlir/CMakeLists.txt b/mlir/CMakeLists.txt
index 599a1cbaafd855..1e80daabddec1c 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