summaryrefslogtreecommitdiffstats
path: root/Modules/FindProtobuf.cmake
diff options
context:
space:
mode:
authorRolf Eike Beer <eb@emlix.com>2019-06-24 11:30:18 (GMT)
committerRolf Eike Beer <eike@sf-mail.de>2019-06-25 13:22:01 (GMT)
commite28240ea1f2d296f99474bb6a709a6d4d7bb1cfa (patch)
tree3fdce38c2ffdf35f3f907d2b5fe0418061050b9c /Modules/FindProtobuf.cmake
parent1009fd18604e7670838ed28798b83312eff1b0f0 (diff)
downloadCMake-e28240ea1f2d296f99474bb6a709a6d4d7bb1cfa.zip
CMake-e28240ea1f2d296f99474bb6a709a6d4d7bb1cfa.tar.gz
CMake-e28240ea1f2d296f99474bb6a709a6d4d7bb1cfa.tar.bz2
FindProtobuf: C++11 support is required since version 3.6.0
Diffstat (limited to 'Modules/FindProtobuf.cmake')
-rw-r--r--Modules/FindProtobuf.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/FindProtobuf.cmake b/Modules/FindProtobuf.cmake
index 76bc873..085e96c 100644
--- a/Modules/FindProtobuf.cmake
+++ b/Modules/FindProtobuf.cmake
@@ -521,6 +521,11 @@ if(Protobuf_INCLUDE_DIR)
set_target_properties(protobuf::libprotobuf PROPERTIES
IMPORTED_LOCATION_DEBUG "${Protobuf_LIBRARY_DEBUG}")
endif()
+ if (Protobuf_VERSION VERSION_GREATER_EQUAL "3.6")
+ set_property(TARGET protobuf::libprotobuf APPEND PROPERTY
+ INTERFACE_COMPILE_FEATURES cxx_std_11
+ )
+ endif()
if(UNIX AND TARGET Threads::Threads)
set_property(TARGET protobuf::libprotobuf APPEND PROPERTY
INTERFACE_LINK_LIBRARIES Threads::Threads)