mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 15:45:52 +08:00
More fine-tunable multithreading of deps
This commit is contained in:
parent
23b01929f7
commit
22f32a046d
@ -14,9 +14,14 @@ endif ()
|
|||||||
# The value of CMAKE_BUILD_TYPE will be used for building each dependency even if the
|
# The value of CMAKE_BUILD_TYPE will be used for building each dependency even if the
|
||||||
# generator is multi-config. Use this var to specify build type regardless of the generator.
|
# generator is multi-config. Use this var to specify build type regardless of the generator.
|
||||||
function(add_cmake_project projectname)
|
function(add_cmake_project projectname)
|
||||||
cmake_parse_arguments(P_ARGS "" "INSTALL_DIR;BUILD_COMMAND;INSTALL_COMMAND;MAX_THREADS" "CMAKE_ARGS" ${ARGN})
|
cmake_parse_arguments(P_ARGS "" "INSTALL_DIR;BUILD_COMMAND;INSTALL_COMMAND" "CMAKE_ARGS" ${ARGN})
|
||||||
|
|
||||||
|
set(_pcount ${DEP_${projectname}_MAX_THREADS})
|
||||||
|
|
||||||
|
if (NOT _pcount)
|
||||||
|
set(_pcount ${DEP_MAX_THREADS})
|
||||||
|
endif ()
|
||||||
|
|
||||||
set(_pcount ${P_ARGS_MAX_THREADS})
|
|
||||||
if (NOT _pcount)
|
if (NOT _pcount)
|
||||||
ProcessorCount(_pcount)
|
ProcessorCount(_pcount)
|
||||||
endif ()
|
endif ()
|
||||||
|
2
deps/+OCCT/OCCT.cmake
vendored
2
deps/+OCCT/OCCT.cmake
vendored
@ -1,6 +1,4 @@
|
|||||||
add_cmake_project(OCCT
|
add_cmake_project(OCCT
|
||||||
MAX_THREADS 4 # Avoid extreme memory usage
|
|
||||||
|
|
||||||
#LMBBS: changed version to 7.6.2
|
#LMBBS: changed version to 7.6.2
|
||||||
URL https://github.com/Open-Cascade-SAS/OCCT/archive/refs/tags/V7_6_2.zip
|
URL https://github.com/Open-Cascade-SAS/OCCT/archive/refs/tags/V7_6_2.zip
|
||||||
URL_HASH SHA256=c696b923593e8c18d059709717dbf155b3e72fdd283c8522047a790ec3a432c5
|
URL_HASH SHA256=c696b923593e8c18d059709717dbf155b3e72fdd283c8522047a790ec3a432c5
|
||||||
|
4
deps/CMakeLists.txt
vendored
4
deps/CMakeLists.txt
vendored
@ -213,14 +213,16 @@ if (DEP_DEBUG AND NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
|
|||||||
foreach (t ${_build_list})
|
foreach (t ${_build_list})
|
||||||
list(APPEND _build_list_dbg ${t}_debug)
|
list(APPEND _build_list_dbg ${t}_debug)
|
||||||
endforeach()
|
endforeach()
|
||||||
dep_message(STATUS "Building dep targets (Debug): ${_build_list_dbg}")
|
|
||||||
|
|
||||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/DebugBuild)
|
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/DebugBuild)
|
||||||
execute_process(
|
execute_process(
|
||||||
COMMAND ${CMAKE_COMMAND} ${CMAKE_CURRENT_SOURCE_DIR} -G${CMAKE_GENERATOR} -DCMAKE_BUILD_TYPE=Debug -DDEP_DOWNLOAD_DIR=${DEP_DOWNLOAD_DIR} -DDESTDIR=${DESTDIR} -DDEP_MESSAGES_WRITTEN=ON
|
COMMAND ${CMAKE_COMMAND} ${CMAKE_CURRENT_SOURCE_DIR} -G${CMAKE_GENERATOR} -DCMAKE_BUILD_TYPE=Debug -DDEP_DOWNLOAD_DIR=${DEP_DOWNLOAD_DIR} -DDESTDIR=${DESTDIR} -DDEP_MESSAGES_WRITTEN=ON
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/DebugBuild
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/DebugBuild
|
||||||
|
OUTPUT_QUIET
|
||||||
)
|
)
|
||||||
|
|
||||||
|
dep_message(STATUS "Building dep targets (Debug): ${_build_list_dbg}")
|
||||||
|
|
||||||
# Can be used to build only the debug libs
|
# Can be used to build only the debug libs
|
||||||
add_custom_target(deps_debug ALL)
|
add_custom_target(deps_debug ALL)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user