OPTION(USE_OMP "Use OpenMP" OFF)

IF(USE_OMP)
    FIND_PACKAGE(OpenMP)
    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_C_FLAGS}")
    SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_CXX_FLAGS}")
    ADD_DEFINITIONS(-DUSE_OMP)
ENDIF(USE_OMP)
