summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-06-26 11:09:20 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-06-26 11:10:43 (GMT)
commitd770b9521292a9dbb6a2d20e4779afa379b79699 (patch)
tree078cda869a96e892ad38a838d94fdcc5390f0b79
parent119643f630a4f5b710b6c88abab9f85490bc6286 (diff)
parente28240ea1f2d296f99474bb6a709a6d4d7bb1cfa (diff)
downloadCMake-d770b9521292a9dbb6a2d20e4779afa379b79699.zip
CMake-d770b9521292a9dbb6a2d20e4779afa379b79699.tar.gz
CMake-d770b9521292a9dbb6a2d20e4779afa379b79699.tar.bz2
Merge topic 'protobuf-c++11'
e28240ea1f FindProtobuf: C++11 support is required since version 3.6.0 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3470
-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)