Skip to content

Commit 37575ba

Browse files
committed
Build in parallel
1 parent 607b8f6 commit 37575ba

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

GNUmakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ all: default
2121

2222
default:
2323
$(MAKE) -C uSockets
24-
$(CC) build.c -o build
24+
$(CC) -fopenmp build.c -o build

build.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,10 @@ int main(int argc, char **argv) {
7373
}
7474

7575
if (!strcmp(argv[1], "examples")) {
76+
#pragma omp parallel for
7677
for (int i = 0; i < sizeof(EXAMPLE_FILES) / sizeof(char *); i++) {
7778
if (run("%s %s examples/%s.cpp %s -o %s%s", CXX, CXXFLAGS, EXAMPLE_FILES[i], LDFLAGS, EXAMPLE_FILES[i], EXEC_SUFFIX)) {
78-
return -1;
79+
exit(-1);
7980
}
8081
}
8182
} else if (!strcmp(argv[1], "capi")) {

0 commit comments

Comments
 (0)