This is an automated email from the ASF dual-hosted git repository.

pengzheng pushed a commit to branch feature/error_injector
in repository https://gitbox.apache.org/repos/asf/celix.git


The following commit(s) were added to refs/heads/feature/error_injector by this 
push:
     new 1a523f11 Fix compilation errors for build-brew and build-apt.
1a523f11 is described below

commit 1a523f11529bbda942cbc55228fdb826150c7ba1
Author: PengZheng <[email protected]>
AuthorDate: Sun Jan 22 17:53:46 2023 +0800

    Fix compilation errors for build-brew and build-apt.
---
 .../pubsub_protocol/pubsub_protocol_lib/gtest/CMakeLists.txt      | 3 ++-
 .../pubsub_protocol_lib/gtest/src/PS_WP_common_tests.cc           | 2 --
 cmake/AddGTest.cmake                                              | 8 +-------
 3 files changed, 3 insertions(+), 10 deletions(-)

diff --git 
a/bundles/pubsub/pubsub_protocol/pubsub_protocol_lib/gtest/CMakeLists.txt 
b/bundles/pubsub/pubsub_protocol/pubsub_protocol_lib/gtest/CMakeLists.txt
index 2d307bf6..12df1e93 100644
--- a/bundles/pubsub/pubsub_protocol/pubsub_protocol_lib/gtest/CMakeLists.txt
+++ b/bundles/pubsub/pubsub_protocol/pubsub_protocol_lib/gtest/CMakeLists.txt
@@ -17,7 +17,7 @@
 
 add_executable(celix_pswp_common_tests src/PS_WP_common_tests.cc)
 target_include_directories(celix_pswp_common_tests PRIVATE 
${CMAKE_CURRENT_SOURCE_DIR}/../src)
-target_link_libraries(celix_pswp_common_tests PRIVATE 
celix_pubsub_protocol_lib GTest::gtest Celix::pubsub_spi GTest::gtest_main 
malloc_ei celix_properties_ei)
+target_link_libraries(celix_pswp_common_tests PRIVATE 
celix_pubsub_protocol_lib GTest::gtest Celix::pubsub_spi GTest::gtest_main)
 
 add_test(NAME celix_pswp_common_tests COMMAND celix_pswp_common_tests)
 setup_target_for_coverage(celix_pswp_common_tests SCAN_DIR ..)
@@ -28,4 +28,5 @@ if (LINKER_WRAP_SUPPORTED)
     target_link_libraries(celix_pswp_common_ei_tests PRIVATE 
celix_pubsub_protocol_lib GTest::gtest Celix::pubsub_spi GTest::gtest_main 
malloc_ei celix_properties_ei)
 
     add_test(NAME celix_pswp_common_ei_tests COMMAND 
celix_pswp_common_ei_tests)
+    setup_target_for_coverage(celix_pswp_common_ei_tests SCAN_DIR ..)
 endif ()
\ No newline at end of file
diff --git 
a/bundles/pubsub/pubsub_protocol/pubsub_protocol_lib/gtest/src/PS_WP_common_tests.cc
 
b/bundles/pubsub/pubsub_protocol/pubsub_protocol_lib/gtest/src/PS_WP_common_tests.cc
index 3cb0d6b4..54c64b35 100644
--- 
a/bundles/pubsub/pubsub_protocol/pubsub_protocol_lib/gtest/src/PS_WP_common_tests.cc
+++ 
b/bundles/pubsub/pubsub_protocol/pubsub_protocol_lib/gtest/src/PS_WP_common_tests.cc
@@ -22,8 +22,6 @@
 #include <gtest/gtest.h>
 #include <iostream>
 #include <cstring>
-#include <celix_properties_ei.h>
-#include <malloc_ei.h>
 
 #include "pubsub_wire_protocol_common.h"
 
diff --git a/cmake/AddGTest.cmake b/cmake/AddGTest.cmake
index d7719ffc..da9e6033 100644
--- a/cmake/AddGTest.cmake
+++ b/cmake/AddGTest.cmake
@@ -21,10 +21,4 @@ FetchContent_Declare(
         GIT_REPOSITORY https://github.com/google/googletest.git
         GIT_TAG        release-1.11.0
 )
-FetchContent_MakeAvailable(googletest)
-
-add_library(GTest::gtest ALIAS gtest)
-add_library(GTest::gtest_main ALIAS gtest_main)
-
-add_library(GTest::gmock ALIAS gmock)
-add_library(GTest::gmock_main ALIAS gmock_main)
\ No newline at end of file
+FetchContent_MakeAvailable(googletest)
\ No newline at end of file

Reply via email to