FIND_PATH(OpenMP_RT_INCLUDE_DIRS omp.h PATHS /usr /usr/local /opt/local)
FIND_LIBRARY(OpenMP_RT NAMES iomp5 PATHS /usr /usr/local /opt/local)

IF (OpenMP_RT)
   SET(OpenMP_RT_LIBRARIES ${OpenMP_RT})
ELSE (OpenMP_RT)
   SET(OpenMP_RT_LIBRARIES "NOTFOUND")
   SET(OpenMP_RT_FOUND FALSE)
ENDIF(OpenMP_RT)

IF (OpenMP_RT_INCLUDE_DIRS AND OpenMP_RT_LIBRARIES)
   SET(OpenMP_RT_FOUND TRUE)
ELSE(OpenMP_RT_INCLUDE_DIRS AND OpenMP_RT_LIBRARIES)
   MESSAGE(ERROR "--> Could not locate OpenMP runtime")
   MESSAGE(ERROR "--> OpenMP_RT_LIBRARIES=${OpenMP_RT_LIBRARIES}") 
   MESSAGE(ERROR "--> OpenMP_RT_INCLUDE_DIRS=${OpenMP_RT_INCLUDE_DIRS}")
   SET(OpenMP_RT_FOUND FALSE)	   
ENDIF (OpenMP_RT_INCLUDE_DIRS AND OpenMP_RT_LIBRARIES)

IF (OpenMP_RT_FOUND)
   IF (NOT OpenMP_RT_FIND_QUIETLY)
      MESSAGE(STATUS "Found OpenMP_RT: ${OpenMP_RT_INCLUDE_DIRS}; ${OpenMP_RT_LIBRARIES}")
   ENDIF (NOT OpenMP_RT_FIND_QUIETLY)
ENDIF (OpenMP_RT_FOUND)