Skip to content

Commit a16e95f

Browse files
ari-kardtrugman
authored andcommitted
Remove explicit --std=c++11 compile-option
1 parent b87122d commit a16e95f

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

CMakeLists.txt

+4-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ option (pfs_BUILD_TESTS "Build tests" ON)
3131
# Actual configuration
3232
# ------------------------------------------------------------------------
3333

34-
add_compile_options (-std=c++11 -Wall -Wextra -pedantic -Werror)
34+
add_compile_options (-Wall -Wextra -pedantic -Werror)
3535

3636
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/out)
3737
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
@@ -43,6 +43,7 @@ aux_source_directory (${pfs_ROOT_SOURCE_DIR}/parsers pfs_PARSERS_SOURCES)
4343
set (SOURCES ${pfs_ROOT_SOURCES} ${pfs_PARSERS_SOURCES})
4444

4545
add_library (pfs ${pfs_SHARED_OR_STATIC} ${SOURCES})
46+
target_compile_features(pfs PUBLIC cxx_std_11)
4647
target_include_directories(
4748
pfs PUBLIC
4849
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
@@ -64,13 +65,15 @@ endif ()
6465
if (pfs_BUILD_SAMPLES)
6566
aux_source_directory (sample pfs_SAMPLE_SOURCES)
6667
add_executable (sample ${pfs_SAMPLE_SOURCES})
68+
target_compile_features(sample PUBLIC cxx_std_11)
6769
target_link_libraries (sample PRIVATE pfs)
6870
endif()
6971

7072
if (pfs_BUILD_TESTS)
7173
set (pfs_UNITTEST_SOURCE_DIR test)
7274
aux_source_directory (${pfs_UNITTEST_SOURCE_DIR} pfs_UNITTEST_SOURCES)
7375
add_executable (unittest ${pfs_UNITTEST_SOURCES})
76+
target_compile_features(unittest PUBLIC cxx_std_11)
7477
target_link_libraries (unittest PRIVATE pfs)
7578
endif()
7679

sample/enum_net.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ int enum_net(std::vector<std::string>&& args)
3535

3636
auto dev = net.get_dev();
3737
print(dev);
38-
38+
3939
auto icmp = net.get_icmp();
4040
print(icmp);
4141

@@ -66,8 +66,8 @@ int enum_net(std::vector<std::string>&& args)
6666
auto udplite6 = net.get_udplite6();
6767
print(udplite6);
6868

69-
auto unix = net.get_unix();
70-
print(unix);
69+
auto unix_ = net.get_unix();
70+
print(unix_);
7171

7272
auto netlink = net.get_netlink();
7373
print(netlink);

0 commit comments

Comments
 (0)