From dd4aa6fb9da11ee89cab3e2cbb4f11733bf7c163 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Wed, 9 Sep 2020 15:14:37 -0700 Subject: [PATCH] Require C++17 for optionals --- code/compiler/13/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/compiler/13/CMakeLists.txt b/code/compiler/13/CMakeLists.txt index 8a3f3c1..851c568 100644 --- a/code/compiler/13/CMakeLists.txt +++ b/code/compiler/13/CMakeLists.txt @@ -1,6 +1,10 @@ cmake_minimum_required(VERSION 3.1) project(compiler) +# We want C++17 for std::optional +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + # Find all the required packages find_package(BISON) find_package(FLEX)