From f629125e67bd0c4c1859615b78f4f9c50a33ff4b Mon Sep 17 00:00:00 2001 From: Paul Hollinsky Date: Thu, 29 Apr 2021 18:08:01 -0400 Subject: [PATCH] Build: Allow inheritance of the C++ standard This fixes symbol name incompatibilities when linking with icsneo::optional between C++ standards. --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b82c5c8..425d247 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,7 +9,9 @@ option(LIBICSNEO_BUILD_ICSNEOC_STATIC "Build static C library" ON) option(LIBICSNEO_BUILD_ICSNEOLEGACY "Build icsnVC40 compatibility library" ON) set(LIBICSNEO_NPCAP_INCLUDE_DIR "" CACHE STRING "Npcap include directory; set to build with Npcap") -set(CMAKE_CXX_STANDARD 11) +if(NOT CMAKE_CXX_STANDARD) + set(CMAKE_CXX_STANDARD 11) +endif() include(GNUInstallDirs)