]> Creatis software - creaVtk.git/commitdiff
#3492 OpenMP MacOs
authorEduardo DAVILA <davila@creatis.insa-lyon.fr>
Wed, 3 Aug 2022 11:11:18 +0000 (13:11 +0200)
committerEduardo DAVILA <davila@creatis.insa-lyon.fr>
Wed, 3 Aug 2022 11:11:18 +0000 (13:11 +0200)
CMakeLists.txt
bbtk_creaVtk_PKG/CMakeLists.txt

index 2b5c5f9feac3156028ca9b1553062db33a44c6ec..cbc290e8dda3ab3e5c5fc07fb16907087ea692b7 100644 (file)
@@ -77,59 +77,6 @@ ENDIF(crea_FOUND)
 #==================================
 
 
-#FIND_PACKAGE(OpenMP)
-#IF(OPENMP_FOUND)
-#    SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
-#    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
-#    message(EED  oooopppppeeeeennnnmmmmmppppp ${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS} )
-#ENDIF()
-#message(EED  oooopppppeeeeennnnmmmmmppppp ${OpenMP_FOUND} )
-
-
-### Find OpenMP
-if(APPLE )
-    if(CMAKE_C_COMPILER_ID MATCHES "Clang")
-        set(OpenMP_C "${CMAKE_C_COMPILER}")
-        set(OpenMP_C_FLAGS "-Xclang -fopenmp=libomp -Wno-unused-command-line-argument")
-        set(OpenMP_C_LIB_NAMES "libomp" "libgomp" "libiomp5")
-        set(OpenMP_libomp_LIBRARY ${OpenMP_C_LIB_NAMES})
-        set(OpenMP_libgomp_LIBRARY ${OpenMP_C_LIB_NAMES})
-        set(OpenMP_libiomp5_LIBRARY ${OpenMP_C_LIB_NAMES})
-    endif()
-    if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
-      set(OpenMP_CXX "${CMAKE_CXX_COMPILER}")
-#      set(OpenMP_CXX_FLAGS "-fopenmp=libomp -Wno-unused-command-line-argument")
-      set(OpenMP_CXX_FLAGS "-Xclang -fopenmp -Wno-unused-command-line-argument")
-      set(OpenMP_CXX_LIB_NAMES "libomp" "libgomp" "libiomp5")
-      set(OpenMP_libomp_LIBRARY ${OpenMP_CXX_LIB_NAMES})
-      
-#EED 2022/05/15
-      set(OpenMP_libomp_LIBRARY_crea libomp.dylib )
-      
-      set(OpenMP_libgomp_LIBRARY ${OpenMP_CXX_LIB_NAMES})
-      set(OpenMP_libiomp5_LIBRARY ${OpenMP_CXX_LIB_NAMES})
-    endif()
-endif()
-  find_package(OpenMP REQUIRED)
-if (OPENMP_FOUND)
-#    include_directories("${OPENMP_INCLUDES}")
-    link_directories("${OPENMP_LIBRARIES}")
-    set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
-    set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
-    # set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
-endif(OPENMP_FOUND)
-
-message(EED  oooopppppeeeeennnnmmmmmppppp2222A ${OPENMP_FOUND} )
-message(EED  oooopppppeeeeennnnmmmmmppppp2222B ${OPENMP_INCLUDES} )
-message(EED  oooopppppeeeeennnnmmmmmppppp2222C ${OpenMP_libomp_LIBRARY} )
-message(EED  oooopppppeeeeennnnmmmmmppppp2222D ${OpenMP_CXX_FLAGS} )
-message(EED  oooopppppeeeeennnnmmmmmppppp2222E ${OpenMP_CXX_LIBRARIES} )
-
-
-
-
-
-
 
 # USER! : Add here as many 'FIND_PACKAGE' blocks as *your* aplication requires
 # -----
@@ -163,6 +110,7 @@ SET(USE_KWWIDGETS OFF)
 SET(USE_VTK       ON)
 SET(USE_ITK       OFF)
 SET(USE_BOOST     OFF)
+SET(USE_OPENMP    ON)
 
 #==================================
 
index afced275ca6a5b6ecfc1284ba5e3b76a7166ca90..202965afe8613776d51420c1a6b939389126f52a 100644 (file)
@@ -145,9 +145,10 @@ SET(${BBTK_PACKAGE_NAME}_INCLUDE_DIRS
 
 #===========================================================================
 SET(${BBTK_PACKAGE_NAME}_LIBS
-creaVtk 
+  creaVtk 
   ${OpenMP_libomp_LIBRARY_crea}
   ${VTK_LIBRARIES}
+  
   # LIST HERE THE ADDITIONAL LIBS TO LINK AGAINST
   # EXCEPT : the same libs than for INCLUDE_DIRS 
   )