Skip to content

Commit 6f756e0

Browse files
authored
Bump the minimum required C++ Standard to 14 (#1821)
* Bump minimal C++ Standard to C++14. * Fix comment
1 parent f8514e4 commit 6f756e0

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,9 @@ option(PCAPPP_USE_XDP "Setup PcapPlusPlus with XDP")
146146
option(PCAPPP_INSTALL "Install Pcap++" ${PCAPPP_MAIN_PROJECT})
147147
option(PCAPPP_PACKAGE "Package Pcap++ could require a recent version of CMake" OFF)
148148

149-
# Set C++11 if not defined
149+
# Set C++14 if not defined
150150
if(NOT DEFINED CMAKE_CXX_STANDARD)
151-
set(CMAKE_CXX_STANDARD 11)
151+
set(CMAKE_CXX_STANDARD 14)
152152
set(CMAKE_CXX_STANDARD_REQUIRED ON)
153153
endif()
154154

Common++/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ set(
3434
# Set the public header that will be installed
3535
set_property(TARGET Common++ PROPERTY PUBLIC_HEADER ${public_headers})
3636

37-
target_compile_features(Common++ PUBLIC cxx_std_11)
37+
target_compile_features(Common++ PUBLIC cxx_std_14)
3838

3939
target_include_directories(
4040
Common++

Examples/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ project(PcapPlusPlusExamples)
44

55
set(CMAKE_PROJECT_HOMEPAGE_URL "https://pcapplusplus.github.io/")
66

7-
# Set C++11
8-
set(CMAKE_CXX_STANDARD 11)
7+
# Set C++14
8+
set(CMAKE_CXX_STANDARD 14)
99
# popen()/pclose() are not C++ standards
1010
set(CMAKE_CXX_EXTENSIONS ON)
1111

Packet++/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ set(
145145
# Don't use set_target_properties CMake limit to 50 elements
146146
set_property(TARGET Packet++ PROPERTY PUBLIC_HEADER ${public_headers})
147147

148-
target_compile_features(Packet++ PUBLIC cxx_std_11)
148+
target_compile_features(Packet++ PUBLIC cxx_std_14)
149149

150150
target_include_directories(
151151
Packet++

Pcap++/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ endif()
6464

6565
set_property(TARGET Pcap++ PROPERTY PUBLIC_HEADER ${public_headers})
6666

67-
target_compile_features(Pcap++ PUBLIC cxx_std_11)
67+
target_compile_features(Pcap++ PUBLIC cxx_std_14)
6868

6969
if(APPLE)
7070
target_link_libraries(Pcap++ PRIVATE "-framework CoreFoundation" "-framework SystemConfiguration")

0 commit comments

Comments
 (0)