From 3c74930c7d253c70b9ab52e6a76ab8f6a155810e Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Mon, 31 May 2021 10:47:07 +0200 Subject: [PATCH] Fix building problems in Macports --- src/tests/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index 3d2deb755..bfb2ba577 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -30,6 +30,10 @@ if(NOT GOOGLETEST_FOUND) "--build" "${CMAKE_BINARY_DIR}/gtest-${GNSSSDR_GTEST_LOCAL_VERSION}" "--config" $<$:Debug>$<$:Release>$<$:RelWithDebInfo>$<$:MinSizeRel>$<$:Debug>$<$:Debug>$<$:RelWithDebInfo>$<$:RelWithDebInfo>$<$:Debug> ) + if(CMAKE_VERSION VERSION_GREATER 3.12) + # Parallel building of gtest causes problems in some environments (e.g. Macports buildings) + set(GTEST_BUILD_COMMAND ${GTEST_BUILD_COMMAND} "--parallel 1") + endif() if(CMAKE_GENERATOR STREQUAL Xcode) set(GTEST_BUILD_COMMAND "xcodebuild" "-configuration" $<$:Debug>$<$:Release>$<$:RelWithDebInfo>$<$:MinSizeRel> "-target" "gtest_main") endif()