I met a project which enable omp and has this line of code in CMakeLists.txt:
include_directories(${CMAKE_CUR_DIR} /usr/lib/llvm-11/include/openmp/)
and I tried to make it more general like:
find_package(OpenMP REQUIRED)
if (OpenMP_CXX_FOUND)
  include_directories(${CMAKE_CUR_DIR) ${OpenMP_CXX_INCLUDE_DIRS})
endif()
but the OpenMP_CXX_INCLUDE_DIRS is still a empty string and the code using include <omp.h> still throw an error, how can I do this?
I tried message(STATUS "${OpenMP_C_INCLUDE_DIRS}") it still a empty string.
 
    