Пример #1
0
def createLibraryHeader(name, location, options):
    target_path = paths.pathToHeader(location, name)
    print 'Creating library header in %s' % target_path
    if not _checkTargetPaths(target_path, options):
        return 1
    print '  Target path is: %s' % target_path
    print ''
    # Copy over .h file for app and perform replacements.
    source_file = paths.pathToTemplate('header_template', 'library_header.h')
    target_file = os.path.join(target_path)
    replacements = buildReplacements('library_header', name, location, target_file, options)
    res = configureFile(target_file, source_file, replacements, options.dry_run, options)
    if res: return res
    return 0
Пример #2
0
def createLibraryHeader(name, location, options):
    target_path = paths.pathToHeader(location, name)
    print 'Creating library header in %s' % target_path
    if not _checkTargetPaths(target_path, options):
        return 1
    print '  Target path is: %s' % target_path
    print ''
    # Copy over .h file for app and perform replacements.
    source_file = paths.pathToTemplate('header_template', 'library_header.h')
    target_file = os.path.join(target_path)
    replacements = buildReplacements('library_header', name, location, target_file, options)
    res = configureFile(target_file, source_file, replacements, options.dry_run, options)
    if res: return res
    return 0
Пример #3
0
def createHeader(name, location, options):
    target_path = paths.pathToHeader(location, name)
    print 'Creating (non-library) header in %s' % target_path
    if not _checkTargetPaths(target_path, options):
        return 1
    print '  Target path is: %s' % target_path
    print ''
    # Copy over .h file for app and perform replacements.
    source_file = paths.pathToTemplate('header_template', 'header.h')
    target_file = os.path.join(target_path)
    replacements = buildReplacements('header', name, location, target_file, options)
    res = configureFile(target_file, source_file, replacements, options.dry_run, options)
    if res: return res
    print 'NOTE: Do not forget to add the header to the CMakeLists.txt file!'
    return 0
Пример #4
0
def createHeader(name, location, options):
    target_path = paths.pathToHeader(location, name)
    print 'Creating (non-library) header in %s' % target_path
    if not _checkTargetPaths(target_path, options):
        return 1
    print '  Target path is: %s' % target_path
    print ''
    # Copy over .h file for app and perform replacements.
    source_file = paths.pathToTemplate('header_template', 'header.h')
    target_file = os.path.join(target_path)
    replacements = buildReplacements('header', name, location, target_file, options)
    res = configureFile(target_file, source_file, replacements, options.dry_run, options)
    if res: return res
    print 'NOTE: Do not forget to add the header to the CMakeLists.txt file!'
    return 0