|
@@ -305,6 +305,26 @@ endif()
|
305
|
305
|
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
306
|
306
|
|
307
|
307
|
if (LEMMA_USE_OPENMP)
|
|
308
|
+
|
|
309
|
+ if(APPLE)
|
|
310
|
+ if(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
|
311
|
+ set(OpenMP_C "${CMAKE_C_COMPILER}")
|
|
312
|
+ set(OpenMP_C_FLAGS "-fopenmp=libomp -Wno-unused-command-line-argument")
|
|
313
|
+ set(OpenMP_C_LIB_NAMES "libomp" "libgomp" "libiomp5")
|
|
314
|
+ set(OpenMP_libomp_LIBRARY ${OpenMP_C_LIB_NAMES})
|
|
315
|
+ set(OpenMP_libgomp_LIBRARY ${OpenMP_C_LIB_NAMES})
|
|
316
|
+ set(OpenMP_libiomp5_LIBRARY ${OpenMP_C_LIB_NAMES})
|
|
317
|
+ endif()
|
|
318
|
+ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
|
319
|
+ set(OpenMP_CXX "${CMAKE_CXX_COMPILER}")
|
|
320
|
+ set(OpenMP_CXX_FLAGS "-fopenmp=libomp -Wno-unused-command-line-argument")
|
|
321
|
+ set(OpenMP_CXX_LIB_NAMES "libomp" "libgomp" "libiomp5")
|
|
322
|
+ set(OpenMP_libomp_LIBRARY ${OpenMP_CXX_LIB_NAMES})
|
|
323
|
+ set(OpenMP_libgomp_LIBRARY ${OpenMP_CXX_LIB_NAMES})
|
|
324
|
+ set(OpenMP_libiomp5_LIBRARY ${OpenMP_CXX_LIB_NAMES})
|
|
325
|
+ endif()
|
|
326
|
+ endif()
|
|
327
|
+
|
308
|
328
|
if (CMAKE_CROSSCOMPILING)
|
309
|
329
|
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp")
|
310
|
330
|
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
|