Skip to content

Commit 7c3f995

Browse files
committed
cmake: add OpenMP support
1 parent d2a30a8 commit 7c3f995

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

cmake/DaemonFlags.cmake

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,17 @@ else()
362362
endif()
363363
endif()
364364

365+
if (NOT NACL AND BUILD_CLIENT)
366+
option(USE_OPENMP "Use OpenMP to parallelize some tasks" OFF)
367+
368+
if (USE_OPENMP)
369+
try_cxx_flag(FOPENMP "-fopenmp")
370+
if (NOT FLAG_FOPENMP)
371+
message(WARNING "Missing OpenMP")
372+
endif()
373+
endif()
374+
endif()
375+
365376
if (NACL AND USE_NACL_SAIGO AND SAIGO_ARCH STREQUAL "arm")
366377
# This should be set for every build type because build type flags
367378
# are set after the other custom flags and then have the last word.

0 commit comments

Comments
 (0)