Skip to content

Commit

Permalink
[TEST] Fix linking order and gmock linking (#3106)
Browse files Browse the repository at this point in the history
* Fix link order

* Fix gmock linking
  • Loading branch information
owent authored Oct 18, 2024
1 parent 63683c1 commit 1185405
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions ext/test/http/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if(WITH_HTTP_CLIENT_CURL)
set(FILENAME curl_http_test)
add_compile_definitions(WITH_CURL)
add_executable(${FILENAME} ${FILENAME}.cc)
target_link_libraries(${FILENAME} ${GTEST_BOTH_LIBRARIES}
target_link_libraries(${FILENAME} ${GMOCK_LIB} ${GTEST_BOTH_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT})

if(TARGET CURL::libcurl)
Expand All @@ -24,8 +24,8 @@ endif()

set(URL_PARSER_FILENAME url_parser_test)
add_executable(${URL_PARSER_FILENAME} ${URL_PARSER_FILENAME}.cc)
target_link_libraries(${URL_PARSER_FILENAME} ${GTEST_BOTH_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT} opentelemetry_api)
target_link_libraries(${URL_PARSER_FILENAME} opentelemetry_api ${GMOCK_LIB}
${GTEST_BOTH_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
gtest_add_tests(
TARGET ${URL_PARSER_FILENAME}
TEST_PREFIX ext.http.urlparser.
Expand Down
4 changes: 2 additions & 2 deletions test_common/src/http/client/nosend/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ if(${BUILD_TESTING})
endif()

target_link_libraries(
opentelemetry_http_client_nosend ${GTEST_BOTH_LIBRARIES} opentelemetry_ext
opentelemetry_test_common)
opentelemetry_http_client_nosend opentelemetry_ext
opentelemetry_test_common ${GMOCK_LIB} ${GTEST_BOTH_LIBRARIES})

endif()

1 comment on commit 1185405

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'OpenTelemetry-cpp sdk Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: 1185405 Previous: 63683c1 Ratio
BM_BaselineBuffer/1 6485802.412033081 ns/iter 2156682.9681396484 ns/iter 3.01

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.