bake-toolkit 2.20.4 → 2.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Rakefile.rb +3 -3
- data/bin/bake +46 -46
- data/bin/bake-doc +11 -11
- data/bin/bakery +179 -179
- data/bin/createVSProjects +213 -213
- data/documentation/_build/html/_sources/changelog.txt +456 -451
- data/documentation/_build/html/_sources/commandline/commandline.txt +107 -107
- data/documentation/_build/html/_sources/concepts/build_hierarchy.txt +34 -34
- data/documentation/_build/html/_sources/concepts/concepts.txt +14 -14
- data/documentation/_build/html/_sources/concepts/inject.txt +65 -65
- data/documentation/_build/html/_sources/concepts/link_order.txt +91 -91
- data/documentation/_build/html/_sources/concepts/prebuild.txt +56 -56
- data/documentation/_build/html/_sources/concepts/the_main_project.txt +45 -45
- data/documentation/_build/html/_sources/concepts/the_project_meta_file.txt +72 -72
- data/documentation/_build/html/_sources/ide/eclipse/eclipse.txt +25 -25
- data/documentation/_build/html/_sources/ide/eclipse/how_to_convert_existing_cdt_workspace.txt +31 -31
- data/documentation/_build/html/_sources/ide/eclipse/how_to_create_a_new_project_in_eclipse.txt +18 -18
- data/documentation/_build/html/_sources/ide/eclipse/how_to_create_a_workspace_in_eclipse.txt +27 -27
- data/documentation/_build/html/_sources/ide/eclipse/how_to_debug_in_eclipse.txt +38 -38
- data/documentation/_build/html/_sources/ide/eclipse/how_to_install_eclipse_plugin.txt +44 -44
- data/documentation/_build/html/_sources/ide/eclipse/how_to_use_bake_in_eclipse.txt +86 -86
- data/documentation/_build/html/_sources/ide/ide_integrations.txt +8 -8
- data/documentation/_build/html/_sources/ide/vs/how_to_create_vs_projects.txt +15 -15
- data/documentation/_build/html/_sources/ide/vs/how_to_debug_in_vs.txt +35 -35
- data/documentation/_build/html/_sources/ide/vs/how_to_used_bake_in_vs.txt +35 -35
- data/documentation/_build/html/_sources/ide/vs/vs.txt +10 -10
- data/documentation/_build/html/_sources/ide/vs/vs_install.txt +43 -43
- data/documentation/_build/html/_sources/index.txt +33 -33
- data/documentation/_build/html/_sources/install/install_bake.txt +112 -112
- data/documentation/_build/html/_sources/internal.txt +50 -50
- data/documentation/_build/html/_sources/known_issues.txt +9 -9
- data/documentation/_build/html/_sources/license.txt +4 -4
- data/documentation/_build/html/_sources/performance/performance.txt +104 -104
- data/documentation/_build/html/_sources/quickstart/quickstart.txt +70 -70
- data/documentation/_build/html/_sources/syntax/adapt_configs.txt +143 -143
- data/documentation/_build/html/_sources/syntax/auto_adjustment.txt +43 -43
- data/documentation/_build/html/_sources/syntax/derive_configs.txt +93 -94
- data/documentation/_build/html/_sources/syntax/project_meta_syntax.txt +19 -19
- data/documentation/_build/html/_sources/syntax/syntax.txt +11 -11
- data/documentation/_build/html/_sources/syntax/variable_substitutions.txt +147 -147
- data/documentation/_build/html/_sources/tips_and_tricks/dot.txt +34 -34
- data/documentation/_build/html/_sources/tips_and_tricks/how_to_use_bake_with_cygwin.txt +62 -62
- data/documentation/_build/html/_sources/tips_and_tricks/static_code_analysis.txt +122 -122
- data/documentation/_build/html/_sources/tips_and_tricks/the_bakery.txt +72 -72
- data/documentation/_build/html/_sources/tips_and_tricks/the_clang.txt +43 -43
- data/documentation/_build/html/_sources/tips_and_tricks/tips_and_tricks.txt +34 -34
- data/documentation/_build/html/_sources/why_bake/why_bake.txt +40 -40
- data/documentation/_build/html/changelog.html +7 -0
- data/documentation/_build/html/commandline/commandline.html +2 -2
- data/documentation/_build/html/concepts/link_order.html +2 -2
- data/documentation/_build/html/concepts/prebuild.html +2 -2
- data/documentation/_build/html/index.html +4 -4
- data/documentation/_build/html/performance/performance.html +2 -2
- data/documentation/_build/html/searchindex.js +1 -1
- data/documentation/_build/html/syntax/adapt_configs.html +2 -2
- data/documentation/_build/html/syntax/syntax.html +2 -2
- data/documentation/_build/html/tips_and_tricks/the_clang.html +2 -2
- data/documentation/_build/html/why_bake/why_bake.html +2 -2
- data/lib/adapt/config/loader.rb +112 -112
- data/lib/bake/bundle.rb +158 -158
- data/lib/bake/cache.rb +179 -180
- data/lib/bake/config/checks.rb +68 -68
- data/lib/bake/config/loader.rb +363 -363
- data/lib/bake/libElement.rb +176 -176
- data/lib/bake/mergeConfig.rb +208 -208
- data/lib/bake/model/language.rb +45 -45
- data/lib/bake/model/loader.rb +99 -99
- data/lib/bake/model/metamodel.rb +307 -307
- data/lib/bake/model/metamodel_ext.rb +27 -27
- data/lib/bake/options/create.rb +95 -95
- data/lib/bake/options/options.rb +315 -310
- data/lib/bake/options/showDoc.rb +20 -20
- data/lib/bake/options/showLicense.rb +9 -9
- data/lib/bake/options/showToolchains.rb +38 -38
- data/lib/bake/options/usage.rb +79 -68
- data/lib/bake/subst.rb +313 -313
- data/lib/bake/toolchain/clang.rb +44 -44
- data/lib/bake/toolchain/clang_analyze.rb +31 -31
- data/lib/bake/toolchain/colorizing_formatter.rb +125 -125
- data/lib/bake/toolchain/diab.rb +53 -53
- data/lib/bake/toolchain/errorparser/diab_compiler_error_parser.rb +40 -40
- data/lib/bake/toolchain/errorparser/diab_linker_error_parser.rb +41 -41
- data/lib/bake/toolchain/errorparser/error_parser.rb +71 -71
- data/lib/bake/toolchain/errorparser/gcc_compiler_error_parser.rb +35 -35
- data/lib/bake/toolchain/errorparser/gcc_linker_error_parser.rb +35 -35
- data/lib/bake/toolchain/errorparser/greenhills_compiler_error_parser.rb +32 -32
- data/lib/bake/toolchain/errorparser/greenhills_linker_error_parser.rb +44 -44
- data/lib/bake/toolchain/errorparser/keil_compiler_error_parser.rb +40 -40
- data/lib/bake/toolchain/errorparser/keil_linker_error_parser.rb +30 -30
- data/lib/bake/toolchain/errorparser/lint_error_parser.rb +34 -34
- data/lib/bake/toolchain/errorparser/msvc_compiler_error_parser.rb +63 -63
- data/lib/bake/toolchain/errorparser/msvc_linker_error_parser.rb +42 -42
- data/lib/bake/toolchain/errorparser/process_output.rb +2 -2
- data/lib/bake/toolchain/errorparser/ti_compiler_error_parser.rb +30 -30
- data/lib/bake/toolchain/errorparser/ti_linker_error_parser.rb +30 -30
- data/lib/bake/toolchain/gcc.rb +49 -49
- data/lib/bake/toolchain/gcc_env.rb +55 -55
- data/lib/bake/toolchain/greenhills.rb +52 -52
- data/lib/bake/toolchain/keil.rb +53 -53
- data/lib/bake/toolchain/lint.rb +20 -20
- data/lib/bake/toolchain/msvc.rb +58 -58
- data/lib/bake/toolchain/provider.rb +146 -146
- data/lib/bake/toolchain/ti.rb +47 -47
- data/lib/bake/util.rb +149 -149
- data/lib/bakery/buildPattern.rb +24 -24
- data/lib/bakery/model/language.rb +22 -22
- data/lib/bakery/model/loader.rb +55 -55
- data/lib/bakery/model/metamodel.rb +48 -48
- data/lib/bakery/options/options.rb +87 -87
- data/lib/bakery/toBake.rb +81 -81
- data/lib/blocks/block.rb +324 -324
- data/lib/blocks/blockBase.rb +204 -204
- data/lib/blocks/commandLine.rb +38 -38
- data/lib/blocks/compile.rb +529 -528
- data/lib/blocks/convert.rb +41 -41
- data/lib/blocks/docu.rb +30 -30
- data/lib/blocks/executable.rb +174 -174
- data/lib/blocks/has_execute_command.rb +31 -31
- data/lib/blocks/library.rb +114 -114
- data/lib/blocks/lint.rb +56 -56
- data/lib/blocks/makefile.rb +100 -100
- data/lib/blocks/showIncludes.rb +140 -125
- data/lib/common/abortException.rb +4 -4
- data/lib/common/cleanup.rb +10 -10
- data/lib/common/exit_helper.rb +38 -38
- data/lib/common/ext/file.rb +88 -88
- data/lib/common/ext/rtext.rb +11 -11
- data/lib/common/ext/stdout.rb +45 -45
- data/lib/common/ide_interface.rb +194 -194
- data/lib/common/options/parser.rb +95 -85
- data/lib/common/process.rb +64 -64
- data/lib/common/utils.rb +52 -52
- data/lib/common/version.rb +31 -23
- data/lib/multithread/job.rb +44 -44
- data/lib/tocxx.rb +558 -555
- data/lib/vs/options.rb +69 -69
- data/license.txt +90 -90
- metadata +2 -2
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
Prebuild configurations for distributions
|
|
2
|
-
*****************************************
|
|
3
|
-
|
|
4
|
-
This is a useful feature if you want to make a part of workspace available for third party without changing the configuration.
|
|
5
|
-
|
|
6
|
-
There are two major use cases:
|
|
7
|
-
|
|
8
|
-
- Only a few projects shall be closed source (e.g. to hide some algorithms)
|
|
9
|
-
- Only a few projects shall be open source (e.g. if a supplier has integrate a library)
|
|
10
|
-
|
|
11
|
-
Both is possible with bake, but the current UI is optimized for the latter one.
|
|
12
|
-
|
|
13
|
-
Add in the Project.meta the following code:
|
|
14
|
-
|
|
15
|
-
.. code-block:: console
|
|
16
|
-
|
|
17
|
-
Prebuild {
|
|
18
|
-
Except main, config: Debug
|
|
19
|
-
Except newLib, config: Debug
|
|
20
|
-
Except setup, config: Release
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
It is possible to specify the Prebuild tags in all configurations, not only in the main configuration. Logically they will be merged.
|
|
24
|
-
|
|
25
|
-
In the example above, no configurations will be built - except those three. The prebuild output is used directly.
|
|
26
|
-
|
|
27
|
-
To reference a configuration of the same project, omit the project name, e.g.:
|
|
28
|
-
|
|
29
|
-
.. code-block:: console
|
|
30
|
-
|
|
31
|
-
Except config: Base
|
|
32
|
-
|
|
33
|
-
To reference all configuration of a project, omit the config name, e.g.:
|
|
34
|
-
|
|
35
|
-
.. code-block:: console
|
|
36
|
-
|
|
37
|
-
Except newLib
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
This prebuild behaviour must be explicitly turned on by using the following the command line argument:
|
|
41
|
-
|
|
42
|
-
.. code-block:: console
|
|
43
|
-
|
|
44
|
-
--prebuild
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
Typical workflow
|
|
48
|
-
----------------
|
|
49
|
-
|
|
50
|
-
1. Compiling the workspace completely without prebuild feature.
|
|
51
|
-
2. Executing a distribution script which copies all relevant files to a distribution directory.
|
|
52
|
-
Make sure to add all header files of prebuild libraries if they are needed for other non-prebuild libraries.
|
|
53
|
-
You may use the dependency files in the output directory for that script.
|
|
54
|
-
3. In the distribution folder use "--prebuild" when compiling the workspace.
|
|
55
|
-
|
|
56
|
-
|
|
1
|
+
Prebuild configurations for distributions
|
|
2
|
+
*****************************************
|
|
3
|
+
|
|
4
|
+
This is a useful feature if you want to make a part of workspace available for third party without changing the configuration.
|
|
5
|
+
|
|
6
|
+
There are two major use cases:
|
|
7
|
+
|
|
8
|
+
- Only a few projects shall be closed source (e.g. to hide some algorithms)
|
|
9
|
+
- Only a few projects shall be open source (e.g. if a supplier has integrate a library)
|
|
10
|
+
|
|
11
|
+
Both is possible with bake, but the current UI is optimized for the latter one.
|
|
12
|
+
|
|
13
|
+
Add in the Project.meta the following code:
|
|
14
|
+
|
|
15
|
+
.. code-block:: console
|
|
16
|
+
|
|
17
|
+
Prebuild {
|
|
18
|
+
Except main, config: Debug
|
|
19
|
+
Except newLib, config: Debug
|
|
20
|
+
Except setup, config: Release
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
It is possible to specify the Prebuild tags in all configurations, not only in the main configuration. Logically they will be merged.
|
|
24
|
+
|
|
25
|
+
In the example above, no configurations will be built - except those three. The prebuild output is used directly.
|
|
26
|
+
|
|
27
|
+
To reference a configuration of the same project, omit the project name, e.g.:
|
|
28
|
+
|
|
29
|
+
.. code-block:: console
|
|
30
|
+
|
|
31
|
+
Except config: Base
|
|
32
|
+
|
|
33
|
+
To reference all configuration of a project, omit the config name, e.g.:
|
|
34
|
+
|
|
35
|
+
.. code-block:: console
|
|
36
|
+
|
|
37
|
+
Except newLib
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
This prebuild behaviour must be explicitly turned on by using the following the command line argument:
|
|
41
|
+
|
|
42
|
+
.. code-block:: console
|
|
43
|
+
|
|
44
|
+
--prebuild
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
Typical workflow
|
|
48
|
+
----------------
|
|
49
|
+
|
|
50
|
+
1. Compiling the workspace completely without prebuild feature.
|
|
51
|
+
2. Executing a distribution script which copies all relevant files to a distribution directory.
|
|
52
|
+
Make sure to add all header files of prebuild libraries if they are needed for other non-prebuild libraries.
|
|
53
|
+
You may use the dependency files in the output directory for that script.
|
|
54
|
+
3. In the distribution folder use "--prebuild" when compiling the workspace.
|
|
55
|
+
|
|
56
|
+
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
The main project
|
|
2
|
-
================
|
|
3
|
-
The concept of the main project is different to many other build systems like Eclipse CDT.
|
|
4
|
-
In these build systems everything which is needed for a project is configured in the project itself.
|
|
5
|
-
In bake the main project can predefine stuff for all subprojects.
|
|
6
|
-
The main project can have a DefaultToolchain definition, which is valid for all projects and files referenced by the main project. Subprojects can overwrite or adjust these definitions.
|
|
7
|
-
|
|
8
|
-
Projects are always built in context of the main project.
|
|
9
|
-
|
|
10
|
-
To build a project, you have to specify
|
|
11
|
-
|
|
12
|
-
* the main project
|
|
13
|
-
* the config of the main project which references the project to build
|
|
14
|
-
* the (sub)project to build if applicable
|
|
15
|
-
|
|
16
|
-
Advantages
|
|
17
|
-
**********
|
|
18
|
-
|
|
19
|
-
Reducing the number of build configurations (toolchain settings like debug or release flags can be set outside of the project)
|
|
20
|
-
Most projects do not have any compiler definitions anymore
|
|
21
|
-
Only flags which must be used or flags which must not be used have to be specified in the projects
|
|
22
|
-
Changing compiler definitions for all projects can be done easily in the main project build configuration
|
|
23
|
-
|
|
24
|
-
Example
|
|
25
|
-
*******
|
|
26
|
-
|
|
27
|
-
============================================== ==============================================
|
|
28
|
-
Project.meta of Main (Debug and Release) Project.meta of Sub (only one build config!)
|
|
29
|
-
============================================== ==============================================
|
|
30
|
-
.. literalinclude:: ../_static/Main.meta .. literalinclude:: ../_static/Lib.meta
|
|
31
|
-
============================================== ==============================================
|
|
32
|
-
|
|
33
|
-
.. note::
|
|
34
|
-
|
|
35
|
-
A main project must have a DefaultToolchain - but it's allowed to leave that definition empty.
|
|
36
|
-
|
|
37
|
-
Output directory
|
|
38
|
-
****************
|
|
39
|
-
|
|
40
|
-
A project in a specific build configuration can be build in different contexts.
|
|
41
|
-
That's why the output directory of a project cannot be simply the build configuration name of the project to avoid inconsistencies.
|
|
42
|
-
Therefore the output directory names are.
|
|
43
|
-
|
|
44
|
-
* Main project: $(MainConfigName) like in regular Eclipse CDT builds
|
|
45
|
-
* Subprojects: $(MainConfigName)_$(MainProjectName) instead of the config name of the subproject
|
|
1
|
+
The main project
|
|
2
|
+
================
|
|
3
|
+
The concept of the main project is different to many other build systems like Eclipse CDT.
|
|
4
|
+
In these build systems everything which is needed for a project is configured in the project itself.
|
|
5
|
+
In bake the main project can predefine stuff for all subprojects.
|
|
6
|
+
The main project can have a DefaultToolchain definition, which is valid for all projects and files referenced by the main project. Subprojects can overwrite or adjust these definitions.
|
|
7
|
+
|
|
8
|
+
Projects are always built in context of the main project.
|
|
9
|
+
|
|
10
|
+
To build a project, you have to specify
|
|
11
|
+
|
|
12
|
+
* the main project
|
|
13
|
+
* the config of the main project which references the project to build
|
|
14
|
+
* the (sub)project to build if applicable
|
|
15
|
+
|
|
16
|
+
Advantages
|
|
17
|
+
**********
|
|
18
|
+
|
|
19
|
+
Reducing the number of build configurations (toolchain settings like debug or release flags can be set outside of the project)
|
|
20
|
+
Most projects do not have any compiler definitions anymore
|
|
21
|
+
Only flags which must be used or flags which must not be used have to be specified in the projects
|
|
22
|
+
Changing compiler definitions for all projects can be done easily in the main project build configuration
|
|
23
|
+
|
|
24
|
+
Example
|
|
25
|
+
*******
|
|
26
|
+
|
|
27
|
+
============================================== ==============================================
|
|
28
|
+
Project.meta of Main (Debug and Release) Project.meta of Sub (only one build config!)
|
|
29
|
+
============================================== ==============================================
|
|
30
|
+
.. literalinclude:: ../_static/Main.meta .. literalinclude:: ../_static/Lib.meta
|
|
31
|
+
============================================== ==============================================
|
|
32
|
+
|
|
33
|
+
.. note::
|
|
34
|
+
|
|
35
|
+
A main project must have a DefaultToolchain - but it's allowed to leave that definition empty.
|
|
36
|
+
|
|
37
|
+
Output directory
|
|
38
|
+
****************
|
|
39
|
+
|
|
40
|
+
A project in a specific build configuration can be build in different contexts.
|
|
41
|
+
That's why the output directory of a project cannot be simply the build configuration name of the project to avoid inconsistencies.
|
|
42
|
+
Therefore the output directory names are.
|
|
43
|
+
|
|
44
|
+
* Main project: $(MainConfigName) like in regular Eclipse CDT builds
|
|
45
|
+
* Subprojects: $(MainConfigName)_$(MainProjectName) instead of the config name of the subproject
|
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
The Project.meta file
|
|
2
|
-
=====================
|
|
3
|
-
|
|
4
|
-
What is the Project.meta file
|
|
5
|
-
*****************************
|
|
6
|
-
The `Project.meta` file is bakes configuration file.
|
|
7
|
-
|
|
8
|
-
* Every project has a Project.meta file in the project root directory.
|
|
9
|
-
* A Project.meta file contains one or more build configurations.
|
|
10
|
-
* A build configuration consists of toolchain settings, files to build, custom steps, etc.
|
|
11
|
-
|
|
12
|
-
Example
|
|
13
|
-
*******
|
|
14
|
-
|
|
15
|
-
============================================= =============================================
|
|
16
|
-
Project.meta file of Main project Project.meta file of Sub project
|
|
17
|
-
============================================= =============================================
|
|
18
|
-
.. literalinclude:: ../_static/PMetaMain.meta .. literalinclude:: ../_static/PMetaSub.meta
|
|
19
|
-
============================================= =============================================
|
|
20
|
-
|
|
21
|
-
Let's assume that Main and Sub are located in the same workspace root.
|
|
22
|
-
To build the executable, bake can be called from the Main directory.
|
|
23
|
-
|
|
24
|
-
.. code-block:: console
|
|
25
|
-
|
|
26
|
-
User@Host:~/my_project$ bake -b Debug
|
|
27
|
-
|
|
28
|
-
What happens now?
|
|
29
|
-
|
|
30
|
-
#. Reading Project.meta of Main
|
|
31
|
-
#. Reading Project.meta of dependencies (Sub)
|
|
32
|
-
#. Compiling sources of Sub, e.g.:
|
|
33
|
-
.. code-block:: console
|
|
34
|
-
|
|
35
|
-
User@Host:~$ g++ -c -Wall -g3 -Iinclude -I../Main/include -o Debug_Main/src/xy.o src/xy.cpp
|
|
36
|
-
|
|
37
|
-
* Wall is taken from the DefaultToolchain and -g3 is added by the toolchain of the Sub project.
|
|
38
|
-
|
|
39
|
-
* The include path to Main is automatically adjusted.
|
|
40
|
-
|
|
41
|
-
* The order of includes is the same as in Project.meta.
|
|
42
|
-
|
|
43
|
-
* g++, -c and -I are used, because GCC was specified in the DefaultToolchain.
|
|
44
|
-
|
|
45
|
-
#. Archiving the library, e.g.:
|
|
46
|
-
|
|
47
|
-
.. code-block:: console
|
|
48
|
-
|
|
49
|
-
User@Host:~$ ar -rc Debug_Main/libSub.a Debug_Main/src/xy.o
|
|
50
|
-
|
|
51
|
-
#. Compiling sources of Main, e.g.:
|
|
52
|
-
|
|
53
|
-
.. code-block:: console
|
|
54
|
-
|
|
55
|
-
User@Host:~$ g++ -c -Wall -Iinclude -o Debug/src/main.o src/main.cpp
|
|
56
|
-
|
|
57
|
-
#. Linking executable, e.g.:
|
|
58
|
-
|
|
59
|
-
.. code-block:: console
|
|
60
|
-
|
|
61
|
-
User@Host:~$ g++ -o Debug/Main.exe Debug/src/main.o ../Sub/Debug_Main/libSub.a -L../Sub/lib -la -lb
|
|
62
|
-
|
|
63
|
-
The library search paths and libraries are added in the specified order.
|
|
64
|
-
|
|
65
|
-
#. Executing the post step
|
|
66
|
-
|
|
67
|
-
.. code-block:: console
|
|
68
|
-
|
|
69
|
-
User@Host:~$ echo Main.exe built.
|
|
70
|
-
|
|
71
|
-
The variable was automatically substituted.
|
|
72
|
-
|
|
1
|
+
The Project.meta file
|
|
2
|
+
=====================
|
|
3
|
+
|
|
4
|
+
What is the Project.meta file
|
|
5
|
+
*****************************
|
|
6
|
+
The `Project.meta` file is bakes configuration file.
|
|
7
|
+
|
|
8
|
+
* Every project has a Project.meta file in the project root directory.
|
|
9
|
+
* A Project.meta file contains one or more build configurations.
|
|
10
|
+
* A build configuration consists of toolchain settings, files to build, custom steps, etc.
|
|
11
|
+
|
|
12
|
+
Example
|
|
13
|
+
*******
|
|
14
|
+
|
|
15
|
+
============================================= =============================================
|
|
16
|
+
Project.meta file of Main project Project.meta file of Sub project
|
|
17
|
+
============================================= =============================================
|
|
18
|
+
.. literalinclude:: ../_static/PMetaMain.meta .. literalinclude:: ../_static/PMetaSub.meta
|
|
19
|
+
============================================= =============================================
|
|
20
|
+
|
|
21
|
+
Let's assume that Main and Sub are located in the same workspace root.
|
|
22
|
+
To build the executable, bake can be called from the Main directory.
|
|
23
|
+
|
|
24
|
+
.. code-block:: console
|
|
25
|
+
|
|
26
|
+
User@Host:~/my_project$ bake -b Debug
|
|
27
|
+
|
|
28
|
+
What happens now?
|
|
29
|
+
|
|
30
|
+
#. Reading Project.meta of Main
|
|
31
|
+
#. Reading Project.meta of dependencies (Sub)
|
|
32
|
+
#. Compiling sources of Sub, e.g.:
|
|
33
|
+
.. code-block:: console
|
|
34
|
+
|
|
35
|
+
User@Host:~$ g++ -c -Wall -g3 -Iinclude -I../Main/include -o Debug_Main/src/xy.o src/xy.cpp
|
|
36
|
+
|
|
37
|
+
* Wall is taken from the DefaultToolchain and -g3 is added by the toolchain of the Sub project.
|
|
38
|
+
|
|
39
|
+
* The include path to Main is automatically adjusted.
|
|
40
|
+
|
|
41
|
+
* The order of includes is the same as in Project.meta.
|
|
42
|
+
|
|
43
|
+
* g++, -c and -I are used, because GCC was specified in the DefaultToolchain.
|
|
44
|
+
|
|
45
|
+
#. Archiving the library, e.g.:
|
|
46
|
+
|
|
47
|
+
.. code-block:: console
|
|
48
|
+
|
|
49
|
+
User@Host:~$ ar -rc Debug_Main/libSub.a Debug_Main/src/xy.o
|
|
50
|
+
|
|
51
|
+
#. Compiling sources of Main, e.g.:
|
|
52
|
+
|
|
53
|
+
.. code-block:: console
|
|
54
|
+
|
|
55
|
+
User@Host:~$ g++ -c -Wall -Iinclude -o Debug/src/main.o src/main.cpp
|
|
56
|
+
|
|
57
|
+
#. Linking executable, e.g.:
|
|
58
|
+
|
|
59
|
+
.. code-block:: console
|
|
60
|
+
|
|
61
|
+
User@Host:~$ g++ -o Debug/Main.exe Debug/src/main.o ../Sub/Debug_Main/libSub.a -L../Sub/lib -la -lb
|
|
62
|
+
|
|
63
|
+
The library search paths and libraries are added in the specified order.
|
|
64
|
+
|
|
65
|
+
#. Executing the post step
|
|
66
|
+
|
|
67
|
+
.. code-block:: console
|
|
68
|
+
|
|
69
|
+
User@Host:~$ echo Main.exe built.
|
|
70
|
+
|
|
71
|
+
The variable was automatically substituted.
|
|
72
|
+
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
Eclipse
|
|
2
|
-
=======
|
|
3
|
-
|
|
4
|
-
.. toctree::
|
|
5
|
-
:maxdepth: 1
|
|
6
|
-
|
|
7
|
-
how_to_install_eclipse_plugin
|
|
8
|
-
how_to_use_bake_in_eclipse
|
|
9
|
-
how_to_convert_existing_cdt_workspace
|
|
10
|
-
how_to_create_a_workspace_in_eclipse
|
|
11
|
-
how_to_create_a_new_project_in_eclipse
|
|
12
|
-
how_to_debug_in_eclipse
|
|
13
|
-
|
|
14
|
-
Syntax highlighting
|
|
15
|
-
*******************
|
|
16
|
-
|
|
17
|
-
To enable syntax highlighting for the Project.meta files in Eclipse, install the "rtext_eclipse_plugin" (Help->Install New Software...) and associate ".meta" files with the rtext editor (Window->Preferences, File Associations page).
|
|
18
|
-
An update site for Eclipse (needed for installation) will be provided soon. For now, you can download it manually at github.
|
|
19
|
-
|
|
20
|
-
Key bindings
|
|
21
|
-
************
|
|
22
|
-
|
|
23
|
-
It is possible to bind the bake commands to keys:
|
|
24
|
-
|
|
25
|
-
.. image:: ../../_static/keys.png
|
|
1
|
+
Eclipse
|
|
2
|
+
=======
|
|
3
|
+
|
|
4
|
+
.. toctree::
|
|
5
|
+
:maxdepth: 1
|
|
6
|
+
|
|
7
|
+
how_to_install_eclipse_plugin
|
|
8
|
+
how_to_use_bake_in_eclipse
|
|
9
|
+
how_to_convert_existing_cdt_workspace
|
|
10
|
+
how_to_create_a_workspace_in_eclipse
|
|
11
|
+
how_to_create_a_new_project_in_eclipse
|
|
12
|
+
how_to_debug_in_eclipse
|
|
13
|
+
|
|
14
|
+
Syntax highlighting
|
|
15
|
+
*******************
|
|
16
|
+
|
|
17
|
+
To enable syntax highlighting for the Project.meta files in Eclipse, install the "rtext_eclipse_plugin" (Help->Install New Software...) and associate ".meta" files with the rtext editor (Window->Preferences, File Associations page).
|
|
18
|
+
An update site for Eclipse (needed for installation) will be provided soon. For now, you can download it manually at github.
|
|
19
|
+
|
|
20
|
+
Key bindings
|
|
21
|
+
************
|
|
22
|
+
|
|
23
|
+
It is possible to bind the bake commands to keys:
|
|
24
|
+
|
|
25
|
+
.. image:: ../../_static/keys.png
|
data/documentation/_build/html/_sources/ide/eclipse/how_to_convert_existing_cdt_workspace.txt
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
How to convert existing CDT workspaces
|
|
2
|
-
======================================
|
|
3
|
-
You only need to convert your workspace if CDT is still used to build your projects and the `Project.meta` files do not exist yet.
|
|
4
|
-
Only one developer in a team has to convert the workspace only once!
|
|
5
|
-
Conversion means, that Project.meta files are generated and filled with the informationen from the `.project` and `.cproject`
|
|
6
|
-
files. bake does not read the `.project` and `.cproject` files, only the `Project.meta` files.
|
|
7
|
-
|
|
8
|
-
The converter is an export wizard, which can be found under `File->Export` or in the context menu of the Project Explorer
|
|
9
|
-
|
|
10
|
-
========================================= =======================================
|
|
11
|
-
.. image:: ../../_static/SelectExport.png .. image:: ../../_static/Script.png
|
|
12
|
-
========================================= =======================================
|
|
13
|
-
|
|
14
|
-
.. note::
|
|
15
|
-
|
|
16
|
-
* The conversion is not a 1:1 conversion. That means, that the tool can only be 99% perfect. There might by some small issues, which have to be adapted manually. You can find it out by simply trying to build your project with bake.
|
|
17
|
-
|
|
18
|
-
* It is possible to specify a ruby script in the wizard window, which can do these manual adaptions. This can make sense, if you want to convert the workspace several times before completely switching to bake.
|
|
19
|
-
|
|
20
|
-
* To convert only a subset of projects instead of the whole workspace, select the appropriate projects in the Project Explorer before starting the export wizard. Ensure that the checkbox shown above is marked.
|
|
21
|
-
|
|
22
|
-
* If you are satisfied with the results, replace the .cproject and .project files in your repository. (Steps to do with .cproject and .project files)
|
|
23
|
-
* Delete the files
|
|
24
|
-
* Remove the projects from your workspace in Eclipse (but do not delete the contents from your disk)
|
|
25
|
-
* Import the projects again via the bake import wizard to generate wrapper files for Eclipse
|
|
26
|
-
* Commit the change to your source control system
|
|
27
|
-
|
|
28
|
-
.. warning::
|
|
29
|
-
Do not commit these `.projec`t and `.cproject` files anymore. Instead, commit the changes in `Project.meta` files.
|
|
30
|
-
You still need `.cproject` and `.project` files for working under Eclipse,
|
|
31
|
-
that's why you have to import the projects again via the bake import wizard.
|
|
1
|
+
How to convert existing CDT workspaces
|
|
2
|
+
======================================
|
|
3
|
+
You only need to convert your workspace if CDT is still used to build your projects and the `Project.meta` files do not exist yet.
|
|
4
|
+
Only one developer in a team has to convert the workspace only once!
|
|
5
|
+
Conversion means, that Project.meta files are generated and filled with the informationen from the `.project` and `.cproject`
|
|
6
|
+
files. bake does not read the `.project` and `.cproject` files, only the `Project.meta` files.
|
|
7
|
+
|
|
8
|
+
The converter is an export wizard, which can be found under `File->Export` or in the context menu of the Project Explorer
|
|
9
|
+
|
|
10
|
+
========================================= =======================================
|
|
11
|
+
.. image:: ../../_static/SelectExport.png .. image:: ../../_static/Script.png
|
|
12
|
+
========================================= =======================================
|
|
13
|
+
|
|
14
|
+
.. note::
|
|
15
|
+
|
|
16
|
+
* The conversion is not a 1:1 conversion. That means, that the tool can only be 99% perfect. There might by some small issues, which have to be adapted manually. You can find it out by simply trying to build your project with bake.
|
|
17
|
+
|
|
18
|
+
* It is possible to specify a ruby script in the wizard window, which can do these manual adaptions. This can make sense, if you want to convert the workspace several times before completely switching to bake.
|
|
19
|
+
|
|
20
|
+
* To convert only a subset of projects instead of the whole workspace, select the appropriate projects in the Project Explorer before starting the export wizard. Ensure that the checkbox shown above is marked.
|
|
21
|
+
|
|
22
|
+
* If you are satisfied with the results, replace the .cproject and .project files in your repository. (Steps to do with .cproject and .project files)
|
|
23
|
+
* Delete the files
|
|
24
|
+
* Remove the projects from your workspace in Eclipse (but do not delete the contents from your disk)
|
|
25
|
+
* Import the projects again via the bake import wizard to generate wrapper files for Eclipse
|
|
26
|
+
* Commit the change to your source control system
|
|
27
|
+
|
|
28
|
+
.. warning::
|
|
29
|
+
Do not commit these `.projec`t and `.cproject` files anymore. Instead, commit the changes in `Project.meta` files.
|
|
30
|
+
You still need `.cproject` and `.project` files for working under Eclipse,
|
|
31
|
+
that's why you have to import the projects again via the bake import wizard.
|