def METHOD_NAME():
    # Make sure that 'cmake' is in the user's path
    try:
        cmake = subprocess.check_output(['which','cmake'])
        cmakeCommand[0] = cmake.strip()
    except subprocess.CalledProcessError:
        print "Error: cannot find 'cmake'"
        sys.exit(1)
    # Pull off any options and arguments from the command line.  I use optparse
    # here so that it will be compatible with Python versions back to 2.4.
    from optparse import OptionParser
    usage = '%prog [-D <var>:<type>=<value> [ ... ]] [Trilinos-src-dir]'
    parser = OptionParser(usage=usage, description=__doc__)
    parser.add_option('-D', type='string', action='append', dest='extraArgs',
                      help='a <var>:<type>=<value> entry to be passed to cmake')
    (options, args) = parser.parse_args()
    # Determine the Trilinos source directory.  If provided on the command line,
    # use it.  If not, the default Trilinos source directory is '..' (which may
    # not be true, but if you use the default, you get what you get...)
    if len(args) > 0:
        trilinosDir = args[0]
    else:
        trilinosDir = '..'
    trilinosDir = os.path.abspath(trilinosDir)
    # Transfer extra cmake options from the command line to the cmake command
    if options.extraArgs:
        for extraArg in options.extraArgs:
            cmakeCommand.append('-D' + extraArg)
    # Obtain the list of packages to build.  These package names are stored in
    # the file Trilinos/doc/DocumentingParameterLists/Packages.txt.  Read them,
    # strip the trailing newlines and store them in a list named 'packages'.
    packagesFileName = os.path.join(trilinosDir,
                                    'doc',
                                    'DocumentingParameterLists',
                                    'Packages.txt')
    packagesFile = open(packagesFileName)
    packages = []
    for package in packagesFile:
        packages.append(package.strip())
    packagesFile.close()
    # Append the cmake command with additional options for each package in the
    # list of packages.
    for package in packages:
        cmakeCommand.append('-DTrilinos_ENABLE_%s:BOOL=ON' % package)
        cmakeCommand.append('-D%s_ENABLE_TESTS:BOOL=ON'    % package)
    # The final command line argument for the cmake command is the Trilinos
    # source directory.
    cmakeCommand.append(trilinosDir)
    # If 'CMakeCache.txt' exists, delete it and echo the command
    cmakeCacheFileName = 'CMakeCache.txt'
    if os.path.isfile(cmakeCacheFileName):
        print 'rm', cmakeCacheFileName
        os.remove(cmakeCacheFileName)
    # If 'CMakeFiles' directory exists, delete it recursively and echo the
    # command.  Note that to get the recursive remove, we have to use
    # subprocess.call()
    cmakeFilesDir = 'CMakeFiles'
    if os.path.isdir(cmakeFilesDir):
        print 'rm -r', cmakeFilesDir
        subprocess.call(['rm', '-r', cmakeFilesDir])
    # Pretty print the cmake command and then call it.  Note that 'join' is a
    # string method that takes a list of strings and joins them together using
    # the parent string as the separator.  We choose a separator string that
    # gives us a space and continuation character, a newline, and indentation.
    print " \\\n    ".join(cmakeCommand)
    subprocess.call(cmakeCommand)