File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,14 @@ if(CMAKE_SYSTEM_PROCESSOR STREQUAL "i686" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "X8
9696 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${FLOAT_FLAGS} " )
9797endif ()
9898
99+ # We use OpenMP to speed up some geometric operations, but it's optional.
100+ include (FindOpenMP )
101+ if (OpenMP_FOUND)
102+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS} " )
103+ else ()
104+ message (WARNING "OpenMP not found, geometric operations will be single-threaded" )
105+ endif ()
106+
99107if (APPLE OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" )
100108 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++" )
101109endif ()
Original file line number Diff line number Diff line change @@ -224,6 +224,7 @@ add_dependencies(solvespace-core
224224 q3d_header )
225225
226226target_link_libraries (solvespace-core
227+ ${OpenMP_CXX_LIBRARIES}
227228 dxfrw
228229 ${util_LIBRARIES}
229230 ${ZLIB_LIBRARY}
You can’t perform that action at this time.
0 commit comments