]> git.leonardobizzoni.com Git - pioneer-stm32/blob
7ec7539aeb8d283237df74173efb822b3db9a467
[pioneer-stm32] /
1 # generated from catkin/cmake/em/order_packages.cmake.em
2 @{
3 import os
4 try:
5     from catkin_pkg.cmake import get_metapackage_cmake_template_path
6 except ImportError as e:
7     raise RuntimeError('ImportError: "from catkin_pkg.cmake import get_metapackage_cmake_template_path" failed: %s\nMake sure that you have installed "catkin_pkg", it is up to date and on the PYTHONPATH.' % e)
8 try:
9     from catkin_pkg.topological_order import topological_order
10 except ImportError as e:
11     raise RuntimeError('ImportError: "from catkin_pkg.topological_order import topological_order" failed: %s\nMake sure that you have installed "catkin_pkg", it is up to date and on the PYTHONPATH.' % e)
12 try:
13     from catkin_pkg.package import InvalidPackage
14 except ImportError as e:
15     raise RuntimeError('ImportError: "from catkin_pkg.package import InvalidPackage" failed: %s\nMake sure that you have installed "catkin_pkg", it is up to date and on the PYTHONPATH.' % e)
16 # vars defined in order_packages.context.py.in
17 try:
18     ordered_packages = topological_order(os.path.normpath(source_root_dir), whitelisted=whitelisted_packages, blacklisted=blacklisted_packages, underlay_workspaces=underlay_workspaces)
19 except InvalidPackage as e:
20     print('message(FATAL_ERROR "%s")' % ('%s' % e).replace('"', '\\"'))
21     ordered_packages = []
22 fatal_error = False
23 }@
24
25 set(CATKIN_ORDERED_PACKAGES "")
26 set(CATKIN_ORDERED_PACKAGE_PATHS "")
27 set(CATKIN_ORDERED_PACKAGES_IS_META "")
28 set(CATKIN_ORDERED_PACKAGES_BUILD_TYPE "")
29 @[for path, package in ordered_packages]@
30 @[if path is None]@
31 message(FATAL_ERROR "Circular dependency in subset of packages:\n@package")
32 @{
33 fatal_error = True
34 }@
35 @[elif package.name != 'catkin']@
36 list(APPEND CATKIN_ORDERED_PACKAGES "@(package.name)")
37 list(APPEND CATKIN_ORDERED_PACKAGE_PATHS "@(path.replace('\\','/'))")
38 list(APPEND CATKIN_ORDERED_PACKAGES_IS_META "@(str('metapackage' in [e.tagname for e in package.exports]))")
39 @{
40 package.evaluate_conditions(os.environ)
41 try:
42     build_type = package.get_build_type()
43 except InvalidPackage:
44     build_type = None
45 }@
46 @[if build_type is None]@
47 message(FATAL_ERROR "Only one <build_type> element is permitted for package '@(package.name)'.")
48 @{
49 fatal_error = True
50 }@
51 @[else]@
52 list(APPEND CATKIN_ORDERED_PACKAGES_BUILD_TYPE "@(package.get_build_type())")
53 @[end if]@
54 @{
55 deprecated = [e for e in package.exports if e.tagname == 'deprecated']
56 }@
57 @[if deprecated]@
58 message("WARNING: Package '@(package.name)' is deprecated@(' (%s)' % deprecated[0].content if deprecated[0].content else '')")
59 @[end if]@
60 @[end if]@
61 @[end for]@
62
63 @[if not fatal_error]@
64 @{
65 message_generators = [package.name for (_, package) in ordered_packages if 'message_generator' in [e.tagname for e in package.exports]]
66 }@
67 set(CATKIN_MESSAGE_GENERATORS @(' '.join(message_generators)))
68 @[end if]@
69
70 set(CATKIN_METAPACKAGE_CMAKE_TEMPLATE "@(get_metapackage_cmake_template_path().replace('\\','/'))")