Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
d41601c2
Commit
d41601c2
authored
Sep 16, 2015
by
Konstantin Podsvirov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved testing from CMake project
Build tests optimization Now lite-test added to CTest collection
parent
0a22fe59
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
tests.cmake
cmake/tests.cmake
+11
-4
No files found.
cmake/tests.cmake
View file @
d41601c2
...
...
@@ -170,8 +170,7 @@ set(tests_files
${
protobuf_source_dir
}
/src/google/protobuf/wire_format_unittest.cc
)
add_executable
(
tests
${
tests_files
}
${
common_test_files
}
${
tests_proto_files
}
${
lite_test_proto_files
}
)
target_link_libraries
(
tests libprotoc libprotobuf gmock_main
)
enable_testing
()
set
(
test_plugin_files
${
protobuf_source_dir
}
/src/google/protobuf/compiler/mock_code_generator.cc
...
...
@@ -182,11 +181,15 @@ set(test_plugin_files
add_executable
(
test_plugin
${
test_plugin_files
}
)
target_link_libraries
(
test_plugin libprotoc libprotobuf gmock
)
add_compile_options
(
-DGOOGLE_PROTOBUF_TEST_PLUGIN_PATH=
"$<TARGET_FILE:test_plugin>"
)
set
(
lite_test_files
${
protobuf_source_dir
}
/src/google/protobuf/lite_unittest.cc
)
add_executable
(
lite-test
${
lite_test_files
}
${
common_lite_test_files
}
${
lite_test_proto_files
}
)
target_link_libraries
(
lite-test libprotobuf-lite
)
add_test
(
NAME lite-test COMMAND lite-test
WORKING_DIRECTORY
${
protobuf_source_dir
}
)
set
(
lite_arena_test_files
${
protobuf_source_dir
}
/src/google/protobuf/lite_arena_unittest.cc
...
...
@@ -194,9 +197,13 @@ set(lite_arena_test_files
add_executable
(
lite-arena-test
${
lite_arena_test_files
}
${
common_lite_test_files
}
${
lite_test_proto_files
}
)
target_link_libraries
(
lite-arena-test libprotobuf-lite gmock_main
)
enable_testing
()
add_compile_options
(
-DGOOGLE_PROTOBUF_TEST_PLUGIN_PATH=
"$<TARGET_FILE:test_plugin>"
)
add_library
(
libtests STATIC
${
common_test_files
}
${
tests_proto_files
}
${
lite_test_proto_files
}
)
# Native single tests
add_executable
(
tests
${
tests_files
}
)
target_link_libraries
(
tests libtests libprotoc libprotobuf gmock_main
)
# Sparated tests for CTest
foreach
(
file
${
tests_files
}
)
get_filename_component
(
name
${
file
}
NAME_WE
)
add_executable
(
${
name
}
${
file
}
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment