From: Eduardo DAVILA Date: Wed, 3 Aug 2022 11:10:21 +0000 (+0200) Subject: #3489 OpenMP MacOs X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=e71999dbcad263ace6a7636078748f7e1e405e1e;p=creaMaracasVisu.git #3489 OpenMP MacOs --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 9177c10..e8da28b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -74,11 +74,12 @@ ENDIF(crea_FOUND) CREA_PREVENT_IN_SOURCE_BUILD() -#SET(USE_GDCM ON) -#SET(USE_GDCM_VTK ON) -SET(USE_WXWIDGETS ON) -SET(USE_VTK ON) -SET(USE_BOOST ON) +#SET(USE_GDCM ON) +#SET(USE_GDCM_VTK ON) +SET(USE_WXWIDGETS ON) +SET(USE_VTK ON) +SET(USE_BOOST ON) +SET(USE_OPENMP ON) OPTION(QT_USE_QTUITOOLS "QT_USE_QTUITOOLS" OFF) IF(QT_USE_QTUITOOLS) @@ -167,31 +168,3 @@ ELSE(WIN32) ENDIF(WIN32) -#. ---- MacOs --------- -#EED /Library/Developer/CommandLineTools/usr/bin/c++ -#EED FLAGS C++ : -Xpreprocessor -fopenmp -# http://secomparteosepierde.blogspot.com/2019/04/how-to-install-openmp-on-mac-using.html -# https://stackoverflow.com/questions/23554716/using-openmp-on-windows-with-mingw-cannot-find-lpthread -#You need -Xpreprocessor flag to use -fopenmp flag -# -# sudo port install libomp-devel -# sudo port -f activate libomp-devel - -##. This cmake code is not working ?????? MacOs.. - -message(STATUS "Checking OpenMP") -find_package(OpenMP ) -if(OpenMP_CXX_FOUND) - message("OpenMP. Yessssssss") -endif() -IF(OPENMP_FOUND) - message("Found OpenMP! ^_^") - # add flags for OpenMP - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${OpenMP_SHARED_LINKER_FLAGS}") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}") -ELSE() - message("Missed OpenMP! :(") -ENDIF() - diff --git a/bbtk/CMakeLists.txt b/bbtk/CMakeLists.txt index c150063..9f65f2c 100644 --- a/bbtk/CMakeLists.txt +++ b/bbtk/CMakeLists.txt @@ -382,12 +382,14 @@ SET(${BBTK_PACKAGE_NAME}_INCLUDE_DIRS ### vtkgdcm #1) - #=========================================================================== SET(${BBTK_PACKAGE_NAME}_LIBS # LIST HERE THE ADDITIONAL LIBS TO LINK AGAINST # EXCEPT : the same libs than for INCLUDE_DIRS ### ${MYSQL_LIBRARIES} + + ${OpenMP_libomp_LIBRARY_crea} + creaMaracasVisu BaseVolumeRenderer @@ -404,6 +406,7 @@ SET(${BBTK_PACKAGE_NAME}_LIBS ### ILPDInterface ### ILPDcontrolerInterface + ) #=========================================================================== diff --git a/lib/maracasVisuLib/CMakeLists.txt b/lib/maracasVisuLib/CMakeLists.txt index d4896a4..c3b3afc 100644 --- a/lib/maracasVisuLib/CMakeLists.txt +++ b/lib/maracasVisuLib/CMakeLists.txt @@ -153,8 +153,11 @@ IF ( BUILD_${LIBRARY_NAME} ) ${WXWIDGETS_LIBRARIES} ${VTK_LIBRARIES} ${ITK_LIBRARIES} -# ${GDCM_LIBRARIES} - # ${BOOST_LIBRARIES} +# ${GDCM_LIBRARIES} +# ${BOOST_LIBRARIES} + ${OpenMP_libomp_LIBRARY_crea} + + #jhcl-Start=========================================================================== ${LIBIDO_LIBRARIES}