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()