diff options
author | Rolf Eike Beer <eike@sf-mail.de> | 2019-07-01 15:03:00 (GMT) |
---|---|---|
committer | Rolf Eike Beer <eike@sf-mail.de> | 2019-07-03 16:49:49 (GMT) |
commit | 194adaf985e86e4cdcc61dc8abd9be4d1a3498b9 (patch) | |
tree | 4edc4c65e08796055e7436f9bc6ae018f8e470ba /Tests | |
parent | 0bddcce987d15b92f7f98a5bddcb74a8bc0251d3 (diff) | |
download | CMake-194adaf985e86e4cdcc61dc8abd9be4d1a3498b9.zip CMake-194adaf985e86e4cdcc61dc8abd9be4d1a3498b9.tar.gz CMake-194adaf985e86e4cdcc61dc8abd9be4d1a3498b9.tar.bz2 |
Tests: require C++11 for some protobuf tests
Newer versions of Protobuf require C++11, which is reflected in the imported
target created by FindProtobuf. Manually set this for all tests that only use
the variables.
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/FindProtobuf/Test/CMakeLists.txt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Tests/FindProtobuf/Test/CMakeLists.txt b/Tests/FindProtobuf/Test/CMakeLists.txt index bc89190..fc6b37e 100644 --- a/Tests/FindProtobuf/Test/CMakeLists.txt +++ b/Tests/FindProtobuf/Test/CMakeLists.txt @@ -29,6 +29,7 @@ add_test(NAME test_tgt_protoc COMMAND test_tgt_protoc) add_executable(test_var_protoc main-protoc.cxx) target_include_directories(test_var_protoc PRIVATE ${Protobuf_INCLUDE_DIRS}) target_link_libraries(test_var_protoc PRIVATE ${Protobuf_PROTOC_LIBRARIES}) +target_compile_features(test_var_protoc PRIVATE cxx_std_11) add_test(NAME test_var_protoc COMMAND test_var_protoc) add_test(NAME test_tgt_protoc_version COMMAND protobuf::protoc --version) @@ -37,14 +38,17 @@ set(Protobuf_IMPORT_DIRS ${Protobuf_INCLUDE_DIRS}) PROTOBUF_GENERATE_CPP(PROTO_SRC PROTO_HEADER msgs/example.proto) PROTOBUF_GENERATE_CPP(DESC_PROTO_SRC DESC_PROTO_HEADER DESCRIPTORS DESC_PROTO_DESC msgs/example_desc.proto) add_library(msgs ${PROTO_SRC} ${PROTO_HEADER}) +target_compile_features(msgs PRIVATE cxx_std_11) add_executable(test_generate main-generate.cxx ${PROTO_SRC}) target_include_directories(test_generate PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) target_link_libraries(test_generate msgs ${Protobuf_LIBRARIES}) +target_compile_features(test_generate PRIVATE cxx_std_11) add_test(NAME test_generate COMMAND test_generate) add_executable(test_desc main-desc.cxx ${DESC_PROTO_SRC}) target_compile_features(test_desc PRIVATE cxx_std_11) target_include_directories(test_desc PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) target_link_libraries(test_desc msgs ${Protobuf_LIBRARIES}) +target_compile_features(test_desc PRIVATE cxx_std_11) add_test(NAME test_desc COMMAND test_desc ${DESC_PROTO_DESC}) |