diff options
author | André Apitzsch <andre.apitzsch@etit.tu-chemnitz.de> | 2017-05-18 11:53:40 (GMT) |
---|---|---|
committer | André Apitzsch <andre.apitzsch@etit.tu-chemnitz.de> | 2017-05-18 11:57:01 (GMT) |
commit | e4e1d194bd6dcda2f5eb759dd4a1356a8b02df5d (patch) | |
tree | ede615959b339a50e5707092c0ebe9b06c6d7fd1 /Tests/FindProtobuf/Test/CMakeLists.txt | |
parent | f29635b66746324e1d6e1f17097dd7bd4ed347b0 (diff) | |
download | CMake-e4e1d194bd6dcda2f5eb759dd4a1356a8b02df5d.zip CMake-e4e1d194bd6dcda2f5eb759dd4a1356a8b02df5d.tar.gz CMake-e4e1d194bd6dcda2f5eb759dd4a1356a8b02df5d.tar.bz2 |
FindProtobuf: add tests
Diffstat (limited to 'Tests/FindProtobuf/Test/CMakeLists.txt')
-rw-r--r-- | Tests/FindProtobuf/Test/CMakeLists.txt | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/Tests/FindProtobuf/Test/CMakeLists.txt b/Tests/FindProtobuf/Test/CMakeLists.txt new file mode 100644 index 0000000..d7a5081 --- /dev/null +++ b/Tests/FindProtobuf/Test/CMakeLists.txt @@ -0,0 +1,32 @@ +cmake_minimum_required(VERSION 3.4) +project(TestFindProtobuf CXX) +include(CTest) + +find_package(Protobuf REQUIRED) + +add_executable(test_tgt main.cxx) +target_link_libraries(test_tgt Protobuf::protobuf) +add_test(NAME test_tgt COMMAND test_tgt) + +add_executable(test_var main.cxx) +target_include_directories(test_var PRIVATE ${Protobuf_INCLUDE_DIRS}) +target_link_libraries(test_var PRIVATE ${Protobuf_LIBRARIES}) +add_test(NAME test_var COMMAND test_var) + +add_executable(test_tgt_lite main.cxx) +target_link_libraries(test_tgt_lite Protobuf::protobuf-lite) +add_test(NAME test_tgt_lite COMMAND test_tgt_lite) + +add_executable(test_var_lite main.cxx) +target_include_directories(test_var_lite PRIVATE ${Protobuf_INCLUDE_DIRS}) +target_link_libraries(test_var_lite PRIVATE ${Protobuf_LITE_LIBRARIES}) +add_test(NAME test_var_lite COMMAND test_var_lite) + +add_executable(test_tgt_protoc main-protoc.cxx) +target_link_libraries(test_tgt_protoc Protobuf::protoc) +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}) +add_test(NAME test_var_protoc COMMAND test_var_protoc) |