MCPcopy Create free account
hub / github.com/Kitware/VTK / get_program_parameters

Function get_program_parameters

Utilities/Maintenance/WhatModulesVTK.py:8–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6
7
8def get_program_parameters():
9 import argparse
10 description = 'Generate a find_package(VTK COMPONENTS ...) that lists all modules referenced by a set of files.'
11 epilogue = '''
12This uses the VTK source folder to determine the modules and headers.
13Then the user files/folders are looked at to find the headers being used.
14Finally a find_package() is output with the modules you need for
15 inclusion in your CMakeLists.txt file.
16
17Note:
181) If include file(s) are not found when building your application.
19 You may need to search the VTK source to find where the file is.
20 Then look at contents of vtk.module in that folder and add the
21 module name to the find_package statement.
222) If linking fails, it usually means that the needed module has not been
23 built, so you may need to add it to your VTK build and rebuild VTK.
243) More modules than strictly necessary may be included.
25 '''
26 parser = argparse.ArgumentParser(description=description, epilog=epilogue,
27 formatter_class=argparse.RawDescriptionHelpFormatter)
28 parser.add_argument('vtk_path', help='The path to the VTK source tree.')
29 parser.add_argument('application', nargs='+', help='Paths to the application files or folders.')
30 args = parser.parse_args()
31 return args.vtk_path, args.application
32
33
34def check_paths(vtk_src_dir, application_srcs):

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected