diff options
author | Nils Gladitz <nilsgladitz@gmail.com> | 2021-04-19 17:37:57 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-04-22 19:40:13 (GMT) |
commit | c5c130e675624eef03f5bcaf848810659e205ed2 (patch) | |
tree | ab057134a2452170450b06777f0149f1d6d8ad53 /Source/CPack/cmCPackArchiveGenerator.h | |
parent | 5380d858ff4cb21ae1a8777a9b721af97f598c37 (diff) | |
download | CMake-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 'Source/CPack/cmCPackArchiveGenerator.h')
-rw-r--r-- | Source/CPack/cmCPackArchiveGenerator.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/CPack/cmCPackArchiveGenerator.h b/Source/CPack/cmCPackArchiveGenerator.h index 5b40013..8a9bbc6 100644 --- a/Source/CPack/cmCPackArchiveGenerator.h +++ b/Source/CPack/cmCPackArchiveGenerator.h @@ -85,7 +85,7 @@ private: return this->OutputExtension.c_str(); } - bool SetArchiveOptions(cmArchiveWrite* archive); + int GetThreadCount() const; private: cmArchiveWrite::Compress Compress; |