summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorNils Gladitz <nilsgladitz@gmail.com>2021-04-19 17:37:57 (GMT)
committerBrad King <brad.king@kitware.com>2021-04-22 19:40:13 (GMT)
commitc5c130e675624eef03f5bcaf848810659e205ed2 (patch)
treeab057134a2452170450b06777f0149f1d6d8ad53 /Tests
parent5380d858ff4cb21ae1a8777a9b721af97f598c37 (diff)
downloadCMake-c5c130e675624eef03f5bcaf848810659e205ed2.zip
CMake-c5c130e675624eef03f5bcaf848810659e205ed2.tar.gz
CMake-c5c130e675624eef03f5bcaf848810659e205ed2.tar.bz2
cmArchiveWrite: Consolidate multiple ways to set thread count
Merge use of SetFilterOption() into more abstract thread count in cmArchiveWrite constructor. libarchive defaulting of threads for threads == 0 seems to be configuration dependent. Preemptively default thread count via std::thread::hardware_concurrency(). Also allow negative values for the thread count in which case the detected hardware concurrency is also used but the given absolute thread count is used as an upper limit.
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/CPack/tests/THREADED_ALL/test.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Tests/RunCMake/CPack/tests/THREADED_ALL/test.cmake b/Tests/RunCMake/CPack/tests/THREADED_ALL/test.cmake
index 6f37201..af39e5f 100644
--- a/Tests/RunCMake/CPack/tests/THREADED_ALL/test.cmake
+++ b/Tests/RunCMake/CPack/tests/THREADED_ALL/test.cmake
@@ -1,6 +1,6 @@
install(FILES CMakeLists.txt DESTINATION foo COMPONENT test)
-set(CPACK_THREADS 0)
+set(CPACK_THREADS "-4")
if(PACKAGING_TYPE STREQUAL "COMPONENT")
set(CPACK_COMPONENTS_ALL test)