if(CLUSTER STREQUAL "")
    ERROR("No target cluster given!")

elseif(${CLUSTER} STREQUAL "iDataCool")
    set(PROVIDER.NULL ON)
    set(PROVIDER.SELF ON)
    set(PROVIDER.CMA ON)
    set(PROVIDER.VERBS ON)
    set(ALLREDUCE.RECURSIVE.DOUBLING ON)

elseif(${CLUSTER} STREQUAL "MPI")
    set(PROVIDER.MPI ON)
    set(ALLREDUCE.MPI ON)

elseif(${CLUSTER} STREQUAL "QPACE2")
    set(PROVIDER.NULL ON)
    set(PROVIDER.SELF ON)
    set(PROVIDER.SCIF ON)
    set(PROVIDER.VERBS ON)
    set(VERBS.MTU 2048 CACHE STRING "Set MTU size.")
    set(VERBS.INLINE 256 CACHE STRING "Set max inline data size.")
    set(ALLREDUCE.RECURSIVE.DOUBLING ON)
    set(RECURSIVE.DOUBLING.BLOCKING 4 CACHE STRING "Set Recursive Doubling blocking factor.")
    set(RECURSIVE.DOUBLING.FBT ON CACHE BOOL "Enable optimization for 1D FBT with four blocks.")
    if(QPACE2.WARN.TOPOLOGY)
        add_definitions(-DQPACE2_WARN_TOPOLOGY)
    endif()

elseif(${CLUSTER} STREQUAL "QPACE3")
    set(PROVIDER.NULL ON)
    set(PROVIDER.SELF ON)
    set(PROVIDER.CMA ON)
    if(QPACE3.PSM2)
        add_definitions(-DQPACE3_PSM2)
        set(PROVIDER.PSM2 ON)
    else()
        set(PROVIDER.OFI ON)
    endif()
    set(ALLREDUCE.RECURSIVE.DOUBLING ON)

elseif(${CLUSTER} STREQUAL "QPACEB")
    set(PROVIDER.NULL ON)
    set(PROVIDER.SELF ON)
    set(PROVIDER.VERBS ON)
    set(ALLREDUCE.RECURSIVE.DOUBLING ON)

elseif(${CLUSTER} STREQUAL "SHM")
    set(PROVIDER.NULL ON)
    set(PROVIDER.SELF ON)
    set(PROVIDER.CMA ON)
    set(ALLREDUCE.RECURSIVE.DOUBLING ON)

else()
    ERROR("Unknown target cluster given!")
endif()

INFO("Cluster: ${CLUSTER}")
