title: How to configure CMakeLists.txt for OpenMP?
body: <p>I am building a python extension from c++ shared library.
  This library is using some openmp pragma.</p>
  
  <p>I would like to know how to configure CMakeLists.txt in order to include openmp ?
  I have added the openmp flag <code>-fopenmp</code>
  But I still have this error : <code>undefined symbol: GOMP_critical_end</code></p>
  
  <p>here is my CMakeLists.txt file</p>
  
  <pre><code>cmake_minimum_required(VERSION 3.10)
  
  set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++lastest -pthread -fopenmp") 
  
  project (py_interface)
  
  #find_library('gomp')
  find_package(OpenMP REQUIRED)
  find_package(Boost REQUIRED) 
  
  include_directories(/usr/include/python3.6/)
  
  link_directories(/usr/local/lib)
  
  set(SRC interface.cpp)
  
  add_library(py_interface SHARED ${SRC})
  
  target_link_libraries(py_interface PRIVATE OpenMP::OpenMP_CXX ${PYTHON_LIBRARIES} ${Boost_LIBRARIES})
  
  set_property(TARGET py_interface PROPERTY POSITION_INDEPENDENT_CODE ON)
  </code></pre>