def convert_define_to_arg(input_define):
    """
    Convert from a #define to a command line arg.

    Parameters
    ----------
    input_define : str
        String in the format of "#define variable value".

    Returns
    -------
    output_str : str
        String in the format of "-Dvariable=value".
    """
    var_and_value = input_define.rstrip()[len('#define '):]
    separator = var_and_value.find(' ')
    var = var_and_value[:separator]
    value = var_and_value[separator + 1:]
    return f'-D{var}={value}'