File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change 42
42
43
43
- name : Build with CMake
44
44
run : |
45
- cmake dynadjust -DBUILD_TESTING=OFF
45
+ cmake dynadjust -DBUILD_TESTING=OFF -DUSE_UNITY_BUILD=ON
46
46
make -j2
47
47
ls -la bin/
48
48
92
92
- name : Build with CMake
93
93
run : |
94
94
source /opt/intel/oneapi/setvars.sh
95
- cmake dynadjust -DUSE_MKL=ON -DBUILD_TESTING=OFF
95
+ cmake dynadjust -DUSE_MKL=ON -DBUILD_TESTING=OFF -DUSE_UNITY_BUILD=ON
96
96
make -j2
97
97
ls -la bin/
98
98
@@ -143,7 +143,7 @@ jobs:
143
143
144
144
- name : Build with CMake
145
145
run : |
146
- cmake -DBUILD_STATIC=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF dynadjust
146
+ cmake -DBUILD_STATIC=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DUSE_UNITY_BUILD=ON dynadjust
147
147
make -j2
148
148
ls -la bin/
149
149
@@ -179,7 +179,7 @@ jobs:
179
179
180
180
- name : Build with CMake
181
181
run : |
182
- cmake dynadjust -DBUILD_TESTING=OFF
182
+ cmake dynadjust -DBUILD_TESTING=OFF -DUSE_UNITY_BUILD=ON
183
183
make -j2 VERBOSE=1
184
184
ls -la bin/
185
185
@@ -204,7 +204,7 @@ jobs:
204
204
205
205
- name : Build with CMake
206
206
run : |
207
- cmake -DBUILD_STATIC=ON -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Release dynadjust
207
+ cmake -DBUILD_STATIC=ON -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Release -DUSE_UNITY_BUILD=ON dynadjust
208
208
make -j2 VERBOSE=1
209
209
ls -la bin/
210
210
Original file line number Diff line number Diff line change @@ -9,10 +9,18 @@ option(ILP64 "Use ILP64 interface (64-bit matrix indexing) for BLAS and LAPACK"
9
9
10
10
# Build optimization options
11
11
option (USE_PRECOMPILED_HEADERS "Use precompiled headers to speed up compilation" ON )
12
+ option (USE_UNITY_BUILD "Use unity builds to speed up compilation" OFF )
12
13
13
14
# Enable precompiled headers
14
15
set (CMAKE_DISABLE_PRECOMPILE_HEADERS OFF )
15
16
17
+ # Enable unity builds if requested
18
+ if (USE_UNITY_BUILD)
19
+ set (CMAKE_UNITY_BUILD ON )
20
+ set (CMAKE_UNITY_BUILD_BATCH_SIZE 16)
21
+ message (STATUS "Unity builds enabled (batch size: ${CMAKE_UNITY_BUILD_BATCH_SIZE} )" )
22
+ endif ()
23
+
16
24
# Fix Boost 1.70+ issue with CMake 3.14+
17
25
if (POLICY CMP0167)
18
26
cmake_policy (SET CMP0167 NEW)
You can’t perform that action at this time.
0 commit comments