-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_versions.sh
More file actions
36 lines (29 loc) · 1.06 KB
/
build_versions.sh
File metadata and controls
36 lines (29 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
# Create compaction directory, -p option makes it ignore if the directory already exists
mkdir -p compaction
mkdir -p filter_and_join
# Compaction options as parallel arrays (for compatibility with older bash versions)
compaction_keys=("logical" "smart")
compaction_values=("USE_NO_COMPACT" "USE_DYNAMIC_COMPACT")
# Project name - replace with your executable name
executables=("filter_and_join" "compaction")
for name in "${executables[@]}"; do
for i in "${!compaction_keys[@]}"; do
key="${compaction_keys[$i]}"
value="${compaction_values[$i]}"
# Build the version
mkdir -p build-${key}
cd build-${key}
# Generate make files with the option enabled
cmake -D${value}=ON ..
# Generate make files with all compaction options off (falls back to no-compact)
cmake ..
# Build the project
make -j96
# Move the project
mv ${name} ../${name}/exe_${key}_${name}
# Return to parent directory
cd ..
rm -rf build-${key}
done
done