Skip to content

Commit 76d175e

Browse files
authored
Merge pull request mfontanini#293 from SpaceIm/fix/cppstd
CMake: set min required C++ standard to C++11
2 parents 93893e1 + fc97759 commit 76d175e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ if (NOT CMAKE_CXX_FLAGS)
2828
add_definitions("-DNOGDI=1")
2929
add_definitions("-DNOMINMAX=1")
3030
else()
31-
set(CMAKE_CXX_FLAGS "-std=c++11 -Wall")
31+
set(CMAKE_CXX_FLAGS "-Wall")
3232
endif()
3333
endif()
3434

src/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ set(NAMESPACE "${PROJECT_NAME}::")
3636
set(TARGET_EXPORT_NAME ${PROJECT_NAME}Targets)
3737

3838
add_library(${TARGET_NAME} ${CPPKAFKA_LIBRARY_TYPE} ${SOURCES})
39+
target_compile_features(${TARGET_NAME} PUBLIC cxx_std_11)
3940
target_include_directories(${TARGET_NAME} PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include/cppkafka>)
4041
set_target_properties(${TARGET_NAME} PROPERTIES
4142
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_INSTALL_LIBDIR}"

0 commit comments

Comments
 (0)