Merge branch 'develop' of github.com:apache/celix into feature/update_gtest_config

* 'develop' of github.com:apache/celix: (34 commits)
  Feature/refactored logging service (#209)
  Updates first svc id to 1
  Adds thread protection to the use of zmq socket.
  Fixes an potential race conditation issues with the creation of service ids.
  Fix data race in get/set bundle state (#214)
  Adds missing lock
  Removing libffi flags from macos build config
  Removing installing libffi with brew from the OSX build. Lets see if the provided libffi for OSX is good enough.
  Changes FindFFI so that the dir /usr/local/opt/libffi has prefernce over /usr/lib for finding libffi.
  Fix crash in pub using ip with post fix
  Fix review comment
  Fix printf error
  Fix test for OSX
  Avoid segfault when stopping bundle
  Fix TCP endpoint handling
  Changed freeSerializeMsg behaviour for pubsub serialization.
  Get proper backtraces when using asan
  Adds link to blocking issue to enable upload to coveralls
  Disables last step of the coverage workflow. Will be enabled when Celix project can configure the thresholds.
  Fix unused variable warning
  ...
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 665eb92..2e5378a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -18,9 +18,9 @@
 cmake_minimum_required (VERSION 3.2)
 cmake_policy(SET CMP0012 NEW)
 cmake_policy(SET CMP0042 NEW)
-#if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.9.0")
-#   cmake_policy(SET CMP0068 NEW)
-#endif()
+if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.9.0")
+   cmake_policy(SET CMP0068 NEW)
+endif()
 
 project (Celix C CXX)
 
@@ -41,7 +41,7 @@
     set(CMAKE_C_FLAGS "-D_GNU_SOURCE -std=gnu99 -fPIC ${CMAKE_C_FLAGS}")
     set(CMAKE_CXX_FLAGS "-std=c++11 -fno-rtti ${CMAKE_CXX_FLAGS}")
     set(CMAKE_C_FLAGS "-Wall -Werror ${CMAKE_C_FLAGS}")
-    set(CMAKE_CXX_FLAGS "-Wall -Wextra -Weffc++ ${CMAKE_CXX_FLAGS}")
+    set(CMAKE_CXX_FLAGS "-Wall -Wextra ${CMAKE_CXX_FLAGS}")
     set(CMAKE_C_FLAGS_DEBUG "-g -DDEBUG ${CMAKE_C_FLAGS}")
     set(CMAKE_CXX_FLAGS_DEBUG "-g -DDEBUG ${CMAKE_CXX_FLAGS}")
 ENDIF()
@@ -117,7 +117,7 @@
 option(CELIX_USE_ZIP_INSTEAD_OF_JAR "Default Celix cmake command will use jar to package bundle (if found). This option enforces Celix to use zip instead." OFF)
 
 if (ENABLE_TESTING)
-    find_package(GTest QUIET)
+    find_package(GTest CONFIG QUIET)
     if (NOT GTest_FOUND)
         include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/AddGTest.cmake)
     endif()
diff --git a/bundles/pubsub/pubsub_protocol_wire_v1/gtest/CMakeLists.txt b/bundles/pubsub/pubsub_protocol_wire_v1/gtest/CMakeLists.txt
index 4420e5c..f86a18e 100644
--- a/bundles/pubsub/pubsub_protocol_wire_v1/gtest/CMakeLists.txt
+++ b/bundles/pubsub/pubsub_protocol_wire_v1/gtest/CMakeLists.txt
@@ -22,7 +22,7 @@
 add_executable(celix_pswp_tests ${SOURCES})
 #target_include_directories(celix_cxx_pswp_tests SYSTEM PRIVATE gtest)
 target_include_directories(celix_pswp_tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../src)
-target_link_libraries(celix_pswp_tests PRIVATE celix_wire_protocol_v1_impl GTest::GTest Celix::pubsub_spi)
+target_link_libraries(celix_pswp_tests PRIVATE celix_wire_protocol_v1_impl GTest::gtest Celix::pubsub_spi)
 
 add_test(NAME celix_pswp_tests COMMAND celix_pswp_tests)
 setup_target_for_coverage(celix_pswp_tests SCAN_DIR ..)
\ No newline at end of file
diff --git a/bundles/remote_services/remote_service_admin_dfi/gtest/CMakeLists.txt b/bundles/remote_services/remote_service_admin_dfi/gtest/CMakeLists.txt
index f8abab3..a5ddba2 100644
--- a/bundles/remote_services/remote_service_admin_dfi/gtest/CMakeLists.txt
+++ b/bundles/remote_services/remote_service_admin_dfi/gtest/CMakeLists.txt
@@ -46,7 +46,7 @@
         Celix::framework
         Celix::rsa_common
         calculator_api
-        GTest::GTest
+        GTest::gtest
 )
 
 get_property(rsa_bundle_file TARGET rsa_dfi PROPERTY BUNDLE_FILE)
diff --git a/cmake/AddGTest.cmake b/cmake/AddGTest.cmake
index f5dc360..c57d57b 100644
--- a/cmake/AddGTest.cmake
+++ b/cmake/AddGTest.cmake
@@ -15,37 +15,16 @@
 # specific language governing permissions and limitations
 # under the License.
 
-include(ExternalProject)
-ExternalProject_Add(
-        googletest_project
+include(FetchContent)
+FetchContent_Declare(
+        googletest
         GIT_REPOSITORY https://github.com/google/googletest.git
-        GIT_TAG release-1.8.1
-        UPDATE_DISCONNECTED TRUE
-        PREFIX ${CMAKE_BINARY_DIR}/gtest
-        INSTALL_COMMAND ""
+        GIT_TAG        release-1.10.0
 )
+FetchContent_MakeAvailable(googletest)
 
-ExternalProject_Get_Property(googletest_project source_dir binary_dir)
+add_library(GTest::gtest ALIAS gtest)
+add_library(GTest::gtest_main ALIAS gtest_main)
 
-file(MAKE_DIRECTORY ${source_dir}/googletest/include)
-add_library(GTest::GTest IMPORTED STATIC GLOBAL)
-add_dependencies(GTest::GTest googletest_project)
-set_target_properties(GTest::GTest PROPERTIES
-        IMPORTED_LOCATION "${binary_dir}/googlemock/gtest/libgtest.a"
-        INTERFACE_INCLUDE_DIRECTORIES "${source_dir}/googletest/include"
-        )
-add_library(GTest::Main IMPORTED STATIC GLOBAL)
-add_dependencies(GTest::Main googletest_project)
-set_target_properties(GTest::Main PROPERTIES
-        IMPORTED_LOCATION "${binary_dir}/googlemock/gtest/libgtest_main.a"
-        INTERFACE_INCLUDE_DIRECTORIES "${source_dir}/googletest/include"
-        )
-
-
-file(MAKE_DIRECTORY ${source_dir}/googlemock/include)
-add_library(GTest::GMock IMPORTED STATIC GLOBAL)
-add_dependencies(GTest::GMock googletest_project)
-set_target_properties(GTest::GMock PROPERTIES
-        IMPORTED_LOCATION "${binary_dir}/googlemock/libgmock.a"
-        INTERFACE_INCLUDE_DIRECTORIES "${source_dir}/googlemock/include"
-        )
+add_library(GTest::gmock ALIAS gmock)
+add_library(GTest::gmock_main ALIAS gmock_main)
\ No newline at end of file
diff --git a/libs/dfi/gtest/CMakeLists.txt b/libs/dfi/gtest/CMakeLists.txt
index 6fa6c71..f969042 100644
--- a/libs/dfi/gtest/CMakeLists.txt
+++ b/libs/dfi/gtest/CMakeLists.txt
@@ -32,7 +32,7 @@
 		src/avrobin_serialization_tests.cpp
 )
 
-target_link_libraries(test_dfi PRIVATE Celix::dfi Celix::utils FFI::lib Jansson GTest::GTest GTest::Main)
+target_link_libraries(test_dfi PRIVATE Celix::dfi Celix::utils FFI::lib Jansson GTest::gtest GTest::gtest_main)
 
 file(COPY ${CMAKE_CURRENT_LIST_DIR}/schemas DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
 file(COPY ${CMAKE_CURRENT_LIST_DIR}/descriptors DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
diff --git a/libs/framework/gtest/CMakeLists.txt b/libs/framework/gtest/CMakeLists.txt
index 130eaf1..5dac9b5 100644
--- a/libs/framework/gtest/CMakeLists.txt
+++ b/libs/framework/gtest/CMakeLists.txt
@@ -37,7 +37,7 @@
     src/dm_tests.cpp
 )
 
-target_link_libraries(test_framework Celix::framework CURL::libcurl GTest::GTest)
+target_link_libraries(test_framework Celix::framework CURL::libcurl GTest::gtest)
 add_dependencies(test_framework simple_test_bundle1_bundle simple_test_bundle2_bundle simple_test_bundle3_bundle simple_test_bundle4_bundle simple_test_bundle5_bundle bundle_with_exception_bundle unresolveable_bundle_bundle)
 target_include_directories(test_framework PRIVATE ../src)