From d5c2b3a8e3549436c0b0d8e6d5949cb3efcae443 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20Vallv=C3=A9=20Navarro?= <jvallve@iri.upc.edu> Date: Tue, 17 May 2022 13:59:44 +0200 Subject: [PATCH] gtest disable pthreads --- test/gtest/CMakeLists.txt | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/test/gtest/CMakeLists.txt b/test/gtest/CMakeLists.txt index 6bd6609..d066e22 100644 --- a/test/gtest/CMakeLists.txt +++ b/test/gtest/CMakeLists.txt @@ -5,16 +5,8 @@ if(${CMAKE_VERSION} VERSION_LESS "3.11.0") include(ExternalProject) set(GTEST_FORCE_SHARED_CRT ON) - set(GTEST_DISABLE_PTHREADS OFF) - - # For some reason I need to disable PTHREADS - # with g++ (Ubuntu 4.9.3-8ubuntu2~14.04) 4.9.3 - # This is a known issue for MinGW : - # https://github.com/google/shaderc/pull/174 - #if(MINGW) - # set(GTEST_DISABLE_PTHREADS ON) - #endif() - + set(GTEST_DISABLE_PTHREADS ON) # without this in ubuntu 18.04 we get linking errors + # Download GoogleTest ExternalProject_Add(googletest GIT_REPOSITORY https://github.com/google/googletest.git @@ -64,6 +56,7 @@ else() GIT_TAG main) #FetchContent_MakeAvailable(googletest) + # Disable installation of googletest: https://stackoverflow.com/questions/65527126/disable-install-for-fetchcontent FetchContent_GetProperties(googletest) if(NOT googletest_POPULATED) FetchContent_Populate(googletest) -- GitLab