import re


def mkccj_is_compiler_command(parsedArgs, commandString):
    """Return True if the commandString is or appears to name a compiler"""
    if parsedArgs.compiler:
        if parsedArgs.compiler == commandString:
            return True
        else:
            return False

    if re.search(r"cc$", commandString):
        return True

    if re.search(r"[cg]\+\+$", commandString):
        return True

    return False