From: My Th <re...@gm...> - 2012-06-20 20:26:28
|
O , 2012-06-19 18:38 +0100, ovalerio rakstīja: > Hi Geoff, > > Thanks. I'm aiming to use OpenBabel as a platform to learn about > parallelization using GPU and multicore CPU. I want also to contribute > the code I develop to the OpenBabel project. Following Noel suggestion I > am first looking at the forcefields used in energy calculation and in > particular MMFF94. > > I followed your advise. After editing the CMakeCache.txt and adding the > compiler flags OpenMP is working for me. However, I would like to avoid > this additional step by adding some conditional compilation lines to the > CMakeLists.txt > > #Find if OpenMP support is enable > 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}") > set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} > ${OpenMP_EXE_LINKER_FLAGS}") > endif() IMHO this should be wrapped in a cmake flag to enable/disable during configuration so it can be explicitly turned on/off as needed, not just rely on automagick feature discovery. Reinis |