From 1d0d8771737ae31b28b600dd703529a4103b51c6 Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Thu, 15 Feb 2024 19:59:02 +0000 Subject: [PATCH] [cmake] Make the compilation of gtest parallel --- cmake/modules/CladGoogleTest.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/modules/CladGoogleTest.cmake b/cmake/modules/CladGoogleTest.cmake index 36e1f9de1..4834da2a4 100644 --- a/cmake/modules/CladGoogleTest.cmake +++ b/cmake/modules/CladGoogleTest.cmake @@ -13,8 +13,7 @@ if(MSVC) -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_MINSIZEREL:PATH=${_gtest_byproduct_binary_dir}/lib/ -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE:PATH=${_gtest_byproduct_binary_dir}/lib/ -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELWITHDEBINFO:PATH=${_gtest_byproduct_binary_dir}/lib/ - -Dgtest_force_shared_crt=ON - BUILD_COMMAND ${CMAKE_COMMAND} --build --config Release) + -Dgtest_force_shared_crt=ON) elseif(APPLE) set(EXTRA_GTEST_OPTS -DCMAKE_OSX_SYSROOT=${CMAKE_OSX_SYSROOT}) endif() @@ -62,6 +61,7 @@ ExternalProject_Add( -DCMAKE_AR=${CMAKE_AR} -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} ${EXTRA_GTEST_OPTS} + BUILD_COMMAND ${CMAKE_COMMAND} --build --config Release -- -j6 # Disable install step INSTALL_COMMAND "" BUILD_BYPRODUCTS ${_gtest_byproducts}