#Use Ninja if found
find_program(NINJA_FOUND ninja)
if(NINJA_FOUND)
    SET (CMAKE_GENERATOR Ninja CACHE BOOL "" FORCE)
    message(STATUS "Using Ninja Generator")
endif()

#Use Clang or AOCC if available
find_program(AOCC_FOUND /opt/AMD/aocc-compiler-3.0.0/bin/clangg)
find_program(CLANG_FOUND clang)
if(AOCC_FOUND)
    SET(CMAKE_C_COMPILER "${AOCC_FOUND}" CACHE BOOL "" FORCE)
    SET(CMAKE_C_COMPILER_ID "Clang" CACHE BOOL "" FORCE)
    SET(CMAKE_C_COMPILER_VERSION 12.0.0)
    message(STATUS "Using AOCC C Compiler")
elseif(CLANG_FOUND)
    SET (CMAKE_C_COMPILER "${CLANG_FOUND}" CACHE BOOL "" FORCE)
    message(STATUS "Using Clang C Compiler")
endif()
find_program(AOCCPP_FOUND /opt/AMD/aocc-compiler-3.0.0/bin/clang++g)
find_program(CLANGPP_FOUND clang++)
if(AOCC_FOUND)
    SET(CMAKE_CXX_COMPILER "${AOCCPP_FOUND}" CACHE BOOL "" FORCE)
    SET(CMAKE_CXX_COMPILER_ID "Clang" CACHE BOOL "" FORCE)
    SET(CMAKE_CXX_COMPILER_VERSION 12.0.0)
    message(STATUS "Using AOCC C++ Compiler")
elseif(CLANG_FOUND)
    SET (CMAKE_CXX_COMPILER "${CLANGPP_FOUND}" CACHE BOOL "" FORCE)
    message(STATUS "Using Clang++ C++ Compiler")
endif()