title: Specifying openmp CUDA flag in a Cmake project
body: <p>How can I pass openmp flag to NVCC when in a cmake project? 
  My CMakeLists.txt for this project looks like this, but compilation fails with "undefined reference to `omp_get_wtime'" message.</p>
  
  <pre><code>cmake_minimum_required (VERSION 2.8.2)
  
  set (CMAKE_MODULE_PATH 
    "${CMAKE_SOURCE_DIR}/cmake" 
    ${CMAKE_MODULE_PATH}
  )
  
  find_package (CUDA 4.0 REQUIRED)
  
  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()
  
  set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin)
  set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib)
  set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib)
  
  if(UNIX)
    add_definitions(-DUNIX)
  endif(UNIX)
  
  add_subdirectory(xor)
  
  CUDA_BUILD_CLEAN_TARGET()
  </code></pre>