[Mlir-commits] [mlir] 6f790f7 - [mlir] Specify CMAKE_CXX_STANDARD to standalone dialect

Lei Zhang llvmlistbot at llvm.org
Tue May 5 12:27:20 PDT 2020


Author: Lei Zhang
Date: 2020-05-05T15:26:55-04:00
New Revision: 6f790f784ee4e690d2b98ec7589279e50bfaf1a4

URL: https://github.com/llvm/llvm-project/commit/6f790f784ee4e690d2b98ec7589279e50bfaf1a4
DIFF: https://github.com/llvm/llvm-project/commit/6f790f784ee4e690d2b98ec7589279e50bfaf1a4.diff

LOG: [mlir] Specify CMAKE_CXX_STANDARD to standalone dialect

This addresses a compilation failure on GCC 5:

error: #error This file requires compiler and library support for the
ISO C++ 2011 standard. This support must be enabled with the -std=c++11
or -std=gnu++11 compiler options.
 #error This file requires compiler and library support

Differential Revision: https://reviews.llvm.org/D79439

Added: 
    

Modified: 
    mlir/examples/standalone/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/mlir/examples/standalone/CMakeLists.txt b/mlir/examples/standalone/CMakeLists.txt
index d0514cbad7c1..fe309b501963 100644
--- a/mlir/examples/standalone/CMakeLists.txt
+++ b/mlir/examples/standalone/CMakeLists.txt
@@ -15,6 +15,8 @@ endif()
 
 project(standalone-dialect LANGUAGES CXX C)
 
+set(CMAKE_CXX_STANDARD 14 CACHE STRING "C++ standard to conform to")
+
 find_package(MLIR REQUIRED CONFIG)
 
 message(STATUS "Using MLIRConfig.cmake in: ${MLIR_DIR}")


        


More information about the Mlir-commits mailing list