From a0f73755e82f961fc3b1661df02ebfc07e5d108f Mon Sep 17 00:00:00 2001 From: Kyle Schwarz Date: Thu, 21 Jul 2022 16:22:52 -0400 Subject: [PATCH] Build: Bump required C++ to 17 --- CMakeLists.txt | 5 ++++- README.md | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index afccb2b..2fa56a2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,7 +19,7 @@ option(LIBICSNEO_ENABLE_CDCACM "Enable devices which communicate over USB CDC AC option(LIBICSNEO_ENABLE_FTDI "Enable devices which communicate over USB FTDI2XX" ON) if(NOT CMAKE_CXX_STANDARD) - set(CMAKE_CXX_STANDARD 11) + set(CMAKE_CXX_STANDARD 17) endif() include(GNUInstallDirs) @@ -34,6 +34,9 @@ if(MSVC) else() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4") endif() + # http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0618r0.html + # Still supported until a suitable replacement is standardized + add_definitions(-D_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING) else() #if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-switch -Wno-unknown-pragmas") endif() diff --git a/README.md b/README.md index ee6d9c2..1984683 100644 --- a/README.md +++ b/README.md @@ -112,13 +112,13 @@ icsneo_closeDevice(myDevice); ## Building from Source ### Windows -Building will require Microsoft Visual Studio 2017+ and CMake to be installed. +Building will require MSVC 2017 version 15.7 or newer and CMake to be installed. ### macOS Getting the dependencies is easiest with the Homebrew package manager. You will also need XCode installed. You can then install CMake, an up-to-date version of GCC or Clang, and `libusb-1.0`. ### Linux The dependencies are as follows - CMake 3.12 or above - - GCC 4.7 or above, 4.8+ recommended + - GCC 7 or above - `libusb-1.0-0-dev` - `libpcap0.8-dev` - `build-essential` is recommended