Browse Source

macOS tweaks for OpenMP

add-code-of-conduct-1
tirons 5 years ago
parent
commit
2086bbc836
1 changed files with 19 additions and 18 deletions
  1. 19
    18
      CMakeLists.txt

+ 19
- 18
CMakeLists.txt View File

@@ -306,24 +306,25 @@ SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
306 306
 
307 307
 if (LEMMA_USE_OPENMP)
308 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()
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 "-Xpreprocessor -fopenmp -I/usr/local/opt/libomp/include")
321
+            #" -DOpenMP_CXX_LIB_NAMES=\"omp\" -DOpenMP_omp_LIBRARY=/usr/local/opt/libomp/lib/libomp.dylib ")
322
+            #            set(OpenMP_CXX_LIB_NAMES "omp") # "libgomp" "libiomp5")
323
+            #            set(OpenMP_libomp_LIBRARY "/usr/local/opt/libomp/lib/libomp.dylib") #${OpenMP_CXX_LIB_NAMES})
324
+            #set(OpenMP_libgomp_LIBRARY ${OpenMP_CXX_LIB_NAMES})
325
+            #set(OpenMP_libiomp5_LIBRARY ${OpenMP_CXX_LIB_NAMES})
326
+            #        endif()
327
+            #    endif()
327 328
 
328 329
     if (CMAKE_CROSSCOMPILING)
329 330
         set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp")

Loading…
Cancel
Save