forked from open-telemetry/opentelemetry-collector
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A little CMake cleanup (open-telemetry#48)
- Loading branch information
Johannes Tax
authored
Mar 10, 2020
1 parent
94d1af4
commit 97ea4d7
Showing
2 changed files
with
12 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,8 @@ | ||
include(GoogleTest) | ||
|
||
add_executable(string_view_test string_view_test.cc) | ||
target_link_libraries(string_view_test ${GTEST_BOTH_LIBRARIES} | ||
${CMAKE_THREAD_LIBS_INIT} opentelemetry_api) | ||
gtest_add_tests(TARGET string_view_test TEST_PREFIX nostd. TEST_LIST | ||
string_view_test) | ||
|
||
add_executable(unique_ptr_test unique_ptr_test.cc) | ||
target_link_libraries(unique_ptr_test ${GTEST_BOTH_LIBRARIES} | ||
${CMAKE_THREAD_LIBS_INIT} opentelemetry_api) | ||
gtest_add_tests(TARGET unique_ptr_test TEST_PREFIX nostd. TEST_LIST | ||
unique_ptr_test) | ||
|
||
add_executable(utility_test utility_test.cc) | ||
target_link_libraries(utility_test ${GTEST_BOTH_LIBRARIES} | ||
${CMAKE_THREAD_LIBS_INIT} opentelemetry_api) | ||
gtest_add_tests(TARGET utility_test TEST_PREFIX nostd. TEST_LIST utility_test) | ||
|
||
add_executable(span_test span_test.cc) | ||
target_link_libraries(span_test ${GTEST_BOTH_LIBRARIES} | ||
${CMAKE_THREAD_LIBS_INIT} opentelemetry_api) | ||
gtest_add_tests(TARGET span_test TEST_PREFIX nostd. TEST_LIST span_test) | ||
foreach(testname string_view_test unique_ptr_test utility_test span_test) | ||
add_executable(${testname} "${testname}.cc") | ||
target_link_libraries(${testname} ${GTEST_BOTH_LIBRARIES} | ||
${CMAKE_THREAD_LIBS_INIT} opentelemetry_api) | ||
gtest_add_tests(TARGET ${testname} TEST_PREFIX nostd. TEST_LIST ${testname}) | ||
endforeach() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,10 @@ | ||
add_executable(noop_test noop_test.cc) | ||
target_link_libraries(noop_test ${GTEST_BOTH_LIBRARIES} | ||
${CMAKE_THREAD_LIBS_INIT} opentelemetry_api) | ||
gtest_add_tests(TARGET noop_test TEST_PREFIX trace. TEST_LIST noop_test) | ||
foreach(testname noop_test span_id_test trace_id_test trace_flags_test) | ||
add_executable(${testname} "${testname}.cc") | ||
target_link_libraries(${testname} ${GTEST_BOTH_LIBRARIES} | ||
${CMAKE_THREAD_LIBS_INIT} opentelemetry_api) | ||
gtest_add_tests(TARGET ${testname} TEST_PREFIX trace. TEST_LIST ${testname}) | ||
endforeach() | ||
|
||
add_executable(span_id_benchmark span_id_benchmark.cc) | ||
target_link_libraries(span_id_benchmark benchmark::benchmark | ||
${CMAKE_THREAD_LIBS_INIT} opentelemetry_api) | ||
|
||
add_executable(span_id_test span_id_test.cc) | ||
target_link_libraries(span_id_test ${GTEST_BOTH_LIBRARIES} | ||
${CMAKE_THREAD_LIBS_INIT} opentelemetry_api) | ||
gtest_add_tests(TARGET span_id_test TEST_PREFIX trace. TEST_LIST span_id_test) | ||
|
||
add_executable(trace_id_test trace_id_test.cc) | ||
target_link_libraries(trace_id_test ${GTEST_BOTH_LIBRARIES} | ||
${CMAKE_THREAD_LIBS_INIT} opentelemetry_api) | ||
gtest_add_tests(TARGET trace_id_test TEST_PREFIX trace. TEST_LIST trace_id_test) | ||
|
||
add_executable(trace_flags_test trace_flags_test.cc) | ||
target_link_libraries(trace_flags_test ${GTEST_BOTH_LIBRARIES} | ||
${CMAKE_THREAD_LIBS_INIT} opentelemetry_api) | ||
gtest_add_tests(TARGET trace_flags_test TEST_PREFIX trace. TEST_LIST | ||
trace_flags_test) |