Imported Upstream version 3.25.0
[platform/upstream/cmake.git] / Help / generator / Green Hills MULTI.rst
1 Green Hills MULTI
2 -----------------
3
4 .. versionadded:: 3.3
5
6 .. versionadded:: 3.15
7   Linux support.
8
9 Generates Green Hills MULTI project files (experimental, work-in-progress).
10
11   The buildsystem has predetermined build-configuration settings that can be controlled
12   via the :variable:`CMAKE_BUILD_TYPE` variable.
13
14 Platform Selection
15 ^^^^^^^^^^^^^^^^^^
16
17 .. versionadded:: 3.13
18
19 The variable ``GHS_PRIMARY_TARGET`` can be used to select the target platform.
20
21   | Sets ``primaryTarget`` entry in project file.
22
23 For example:
24
25 * ``cmake -G "Green Hills MULTI" -D GHS_PRIMARY_TARGET=ppc_integrity.tgt``
26
27 Otherwise the ``primaryTarget`` will be composed from the values of :variable:`CMAKE_GENERATOR_PLATFORM`
28 and ``GHS_TARGET_PLATFORM``. Defaulting to the value of ``arm_integrity.tgt``
29
30 * The :variable:`CMAKE_GENERATOR_PLATFORM` variable may be set, perhaps
31   via the :option:`cmake -A` option.
32
33   | Typical values of ``arm``, ``ppc``, ``86``, etcetera, are used.
34
35 * The variable ``GHS_TARGET_PLATFORM`` may be set, perhaps via the :option:`cmake -D`
36   option.
37
38   | Defaults to ``integrity``.
39   | Usual values are ``integrity``, ``threadx``, ``uvelosity``, ``velosity``,
40     ``vxworks``, ``standalone``.
41
42 For example:
43
44 * ``cmake -G "Green Hills MULTI"`` for ``arm_integrity.tgt``.
45 * ``cmake -G "Green Hills MULTI" -A 86`` for ``86_integrity.tgt``.
46 * ``cmake -G "Green Hills MULTI" -D GHS_TARGET_PLATFORM=standalone`` for ``arm_standalone.tgt``.
47 * ``cmake -G "Green Hills MULTI" -A ppc -D GHS_TARGET_PLATFORM=standalone`` for ``ppc_standalone.tgt``.
48
49 Toolset Selection
50 ^^^^^^^^^^^^^^^^^
51
52 .. versionadded:: 3.13
53
54 The generator searches for the latest compiler or can be given a location to use.
55 ``GHS_TOOLSET_ROOT`` is the directory that is checked for the latest compiler.
56
57 * The :variable:`CMAKE_GENERATOR_TOOLSET` option may be set, perhaps
58   via the :option:`cmake -T` option, to specify the location of the toolset.
59   Both absolute and relative paths are valid. Paths are relative to ``GHS_TOOLSET_ROOT``.
60
61 * The variable ``GHS_TOOLSET_ROOT`` may be set, perhaps via the :option:`cmake -D`
62   option.
63
64   | Root path for toolset searches and relative paths.
65   | Defaults to ``C:/ghs`` in Windows or ``/usr/ghs`` in Linux.
66
67 For example, setting a specific compiler:
68
69 * ``cmake -G "Green Hills MULTI" -T comp_201754`` for ``/usr/ghs/comp_201754``.
70 * ``cmake -G "Green Hills MULTI" -T comp_201754 -D GHS_TOOLSET_ROOT=/opt/ghs`` for ``/opt/ghs/comp_201754``.
71 * ``cmake -G "Green Hills MULTI" -T /usr/ghs/comp_201554``
72 * ``cmake -G "Green Hills MULTI" -T C:/ghs/comp_201754``
73
74 For example, searching for latest compiler:
75
76 * ``cmake -G "Green Hills MULTI"`` for searching ``/usr/ghs``.
77 * ``cmake -G "Green Hills MULTI -D GHS_TOOLSET_ROOT=/opt/ghs"`` for searching ``/opt/ghs``.
78
79 .. note::
80   The :variable:`CMAKE_GENERATOR_TOOLSET` should use CMake style paths.
81
82 OS and BSP Selection
83 ^^^^^^^^^^^^^^^^^^^^
84
85 .. versionadded:: 3.3
86
87 Certain target platforms, like Integrity, require an OS.  The RTOS directory path
88 can be explicitly set using ``GHS_OS_DIR``.  Otherwise ``GHS_OS_ROOT`` will be
89 searched for the latest Integrity RTOS.
90
91 If the target platform, like Integrity, requires a BSP name then it can be set via
92 the ``GHS_BSP_NAME`` variable.
93
94 * ``GHS_OS_DIR`` and ``GHS_OS_DIR_OPTION``
95
96   | Sets ``-os_dir`` entry in project file.
97
98   | ``GHS_OS_DIR_OPTION`` default value is ``-os_dir``.
99
100   .. versionadded:: 3.15
101     The ``GHS_OS_DIR_OPTION`` variable.
102
103   For example:
104
105   * ``cmake -G "Green Hills MULTI" -D GHS_OS_DIR=/usr/ghs/int1144``
106
107 * ``GHS_OS_ROOT``
108
109   | Root path for RTOS searches.
110   | Defaults to ``C:/ghs`` in Windows or ``/usr/ghs`` in Linux.
111
112   For example:
113
114   * ``cmake -G "Green Hills MULTI" -D GHS_OS_ROOT=/opt/ghs``
115
116 * ``GHS_BSP_NAME``
117
118   | Sets ``-bsp`` entry in project file.
119   | Defaults to ``sim<arch>`` for ``integrity`` platforms.
120
121   For example:
122
123   * ``cmake -G "Green Hills MULTI"`` for ``simarm`` on ``arm_integrity.tgt``.
124   * ``cmake -G "Green Hills MULTI" -A 86`` for ``sim86`` on ``86_integrity.tgt``.
125   * ``cmake -G "Green Hills MULTI" -A ppc -D GHS_BSP_NAME=sim800`` for ``sim800``
126     on ``ppc_integrity.tgt``.
127   * ``cmake -G "Green Hills MULTI" -D GHS_PRIMARY_TARGET=ppc_integrity.tgt -D GHS_BSP_NAME=fsl-t1040``
128     for ``fsl-t1040`` on ``ppc_integrity.tgt``.
129
130 Target Properties
131 ^^^^^^^^^^^^^^^^^
132
133 .. versionadded:: 3.14
134
135 The following properties are available:
136
137 * :prop_tgt:`GHS_INTEGRITY_APP`
138 * :prop_tgt:`GHS_NO_SOURCE_GROUP_FILE`
139
140 MULTI Project Variables
141 ^^^^^^^^^^^^^^^^^^^^^^^
142
143 .. versionadded:: 3.3
144
145 Adding a Customization file and macros are available through the use of the following
146 variables:
147
148 * ``GHS_CUSTOMIZATION`` - CMake path name to Customization File.
149 * ``GHS_GPJ_MACROS`` - CMake list of Macros.
150
151 .. note::
152   This generator is deemed experimental as of CMake |release|
153   and is still a work in progress.  Future versions of CMake
154   may make breaking changes as the generator matures.