summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rw-r--r--build/CMakeLists.txt3
-rw-r--r--build/build.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/build/CMakeLists.txt b/build/CMakeLists.txt
index 345f68207..6626bdcce 100644
--- a/build/CMakeLists.txt
+++ b/build/CMakeLists.txt
@@ -30,7 +30,8 @@ if(WITH_CAP)
endif()
if(OpenMP_C_FOUND)
- target_link_libraries(librpmbuild PRIVATE ${OpenMP_C_LIBRARIES})
+ target_compile_options(librpmbuild PRIVATE ${OpenMP_C_FLAGS})
+ target_link_libraries(librpmbuild PRIVATE ${OpenMP_C_LIBRARIES})
endif()
diff --git a/build/build.c b/build/build.c
index 29afbdd4f..9cd569b83 100644
--- a/build/build.c
+++ b/build/build.c
@@ -472,7 +472,7 @@ static rpmRC buildSpec(rpmts ts, BTA_t buildArgs, rpmSpec spec, int what)
(void) unlink(spec->specFile);
exit:
-#if WITH_OPENMP
+#ifdef ENABLE_OPENMP
omp_set_num_threads(prev_threads);
#endif
freeStringBuf(sink);