summaryrefslogtreecommitdiff
path: root/Source/cmAffinity.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-03-01 10:38:15 -0500
committerBrad King <brad.king@kitware.com>2018-03-05 09:21:32 -0500
commit6be53c6695e8d82d3633681f893b79db1de466f0 (patch)
tree753efcf002e0af8545df663288627d142a299f80 /Source/cmAffinity.h
parentc5428d8db2aebb215b418d72eae99f4a106a82b0 (diff)
downloadcmake-6be53c6695e8d82d3633681f893b79db1de466f0.tar.gz
CTest: Add options to control test process affinity to CPUs
In commit v2.8.0~170 (ENH: Added ctest test options PROCESSORS and RUN_SERIAL, 2009-09-07) CTest learned to track the number of processors allocated to running tests in order to balance it against the desired level of parallelism. Extend this idea by introducing a new `PROCESSOR_AFFINITY` test property to ask that CTest run a test with the CPU affinity mask set. This will allow a set of tests that are running concurrently to use disjoint CPU resources.
Diffstat (limited to 'Source/cmAffinity.h')
-rw-r--r--Source/cmAffinity.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/cmAffinity.h b/Source/cmAffinity.h
new file mode 100644
index 0000000000..3775bae40e
--- /dev/null
+++ b/Source/cmAffinity.h
@@ -0,0 +1,12 @@
+/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+ file Copyright.txt or https://cmake.org/licensing for details. */
+#pragma once
+#include "cmConfigure.h" // IWYU pragma: keep
+
+#include <cstddef>
+#include <set>
+
+namespace cmAffinity {
+
+std::set<size_t> GetProcessorsAvailable();
+}