From 0b7fffe53f9771e7129c320732192573eb7d14fa Mon Sep 17 00:00:00 2001 From: Sherry Yuan Date: Mon, 7 Feb 2022 12:29:41 -0800 Subject: [PATCH] Upgrade to C++17 Standard -------------------------------- C++17 contains much more features that: 1. add flexibility (eg. std::any, std::variant) 2. potential performance improvement 3. type safety For more info see: https://en.cppreference.com/w/cpp/17 Compiler support (min version required to access all C++17 features): 1. GCC ^7 2. MSVC ^19.14 Our current version: 1. GCC 7.5 2. MSVC 2017 = MSVC 19.16 To figure out local MSVC compiler version run: `cl /Bv` For more information about what feature is supported at which version see: https://en.cppreference.com/w/cpp/compiler_support --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0ac8a0c6..94254be1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 3.10) project(fpga-runtime-for-opencl C CXX) # Set default C++ standard property of targets. -set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) # https://gitlab.kitware.com/cmake/community/-/wikis/doc/cpack/Packaging-With-CPack