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.
Showing
- Modules/CPack.cmake 13 additions, 5 deletionsModules/CPack.cmake
- Source/CPack/cmCPackArchiveGenerator.cxx 11 additions, 28 deletionsSource/CPack/cmCPackArchiveGenerator.cxx
- Source/CPack/cmCPackArchiveGenerator.h 1 addition, 1 deletionSource/CPack/cmCPackArchiveGenerator.h
- Source/CPack/cmCPackDebGenerator.cxx 0 additions, 5 deletionsSource/CPack/cmCPackDebGenerator.cxx
- Source/cmArchiveWrite.cxx 30 additions, 18 deletionsSource/cmArchiveWrite.cxx
- Source/cmArchiveWrite.h 0 additions, 3 deletionsSource/cmArchiveWrite.h
- Tests/RunCMake/CPack/tests/THREADED_ALL/test.cmake 1 addition, 1 deletionTests/RunCMake/CPack/tests/THREADED_ALL/test.cmake
Loading
Please register or sign in to comment