Skip to content

Conversation

nikalra
Copy link
Contributor

@nikalra nikalra commented Oct 18, 2024

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 previously hardcoded the CXX version to C++17. Updated to allow for the CXX version to be set by clients (mirrors other LLVM projects).
@nikalra nikalra requested a review from joker-eph October 18, 2024 19:08
@llvmbot llvmbot added the mlir label Oct 18, 2024
@llvmbot
Copy link
Member

llvmbot commented Oct 18, 2024

@llvm/pr-subscribers-mlir

Author: Nikhil Kalra (nikalra)

Changes

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).


Full diff: https://github.com/llvm/llvm-project/pull/112957.diff

1 Files Affected:

  • (modified) mlir/CMakeLists.txt (+1-1)
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)

@nikalra nikalra merged commit e261519 into llvm:main Oct 18, 2024
10 checks passed
@nikalra nikalra deleted the mlir-cxx-standard branch October 18, 2024 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants