Skip to content

[mlir] Allow CXX standard to be overridden #112957

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 18, 2024
Merged

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
KFAFSP pushed a commit to KFAFSP/llvm-project that referenced this pull request Nov 7, 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).
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