[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).
This commit is contained in:
Nikhil Kalra
2024-10-18 15:22:39 -07:00
committed by GitHub
parent 03dcd88c78
commit e26151913c

View File

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