CMake: Set CXX_STANDARD to C++11 if not set elsewhere
We need at least C++11. If we're statically compiling into an application, we want to be using the same CXX_STANDARD as it for ABI compatibility (particularly with icsneo::optional), hence having the check around it.pull/43/head
parent
d097fb9a74
commit
714db03a05
|
|
@ -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_REQUIRED 11)
|
||||
if(NOT CMAKE_CXX_STANDARD)
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
endif()
|
||||
|
||||
include(GNUInstallDirs)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue