bake-toolkit 2.20.4 → 2.21.0
Sign up to get free protection for your applications and to get access to all the features.
- 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,122 +1,122 @@
|
|
1
|
-
Static Code Analysis
|
2
|
-
====================
|
3
|
-
|
4
|
-
Static code analysis often is part or a pre step of the build, even though bake provides presteps which can be used to
|
5
|
-
add customized steps, we choose to add explicit support for static code analysis due to the fact that the analysis often
|
6
|
-
depends on information well known by the build system (include pahts, compiler flags, etc.). Currently bake has built in
|
7
|
-
support for *Pc-Lint*.
|
8
|
-
|
9
|
-
Lint
|
10
|
-
****
|
11
|
-
|
12
|
-
With bake you can lint LibraryConfigs, ExecutableConfigs, single files and the complete workspace (in this case the projects are linted separately).
|
13
|
-
The CPP Toolchain settings of the project are used regardless of the file type and file specific options.
|
14
|
-
It is possible to specify lnt-files with LintPolicy, but you can add every other lint command line option as well.
|
15
|
-
|
16
|
-
Basic Setup
|
17
|
-
-----------
|
18
|
-
|
19
|
-
#. Install `lint <http://www.gimpel.com/html/products.htm>`_.
|
20
|
-
#. Make sure the The lint executable 'lint-nt.exe' is in the path.
|
21
|
-
|
22
|
-
.. attention::
|
23
|
-
|
24
|
-
even though there is a unix version of pc-lint the asscoated binary name must be lint-nt.exe otherwise
|
25
|
-
it won't be recorgnized by the bake build system.
|
26
|
-
|
27
|
-
After doing this steps you are able to lint your build configurations (LibraryConfigs and ExecutableConfigs) using the *--lint* flag on the command line.
|
28
|
-
|
29
|
-
Example
|
30
|
-
+++++++
|
31
|
-
.. code-block:: console
|
32
|
-
|
33
|
-
User@Host:~$ bake Debug -p MyLibraryProject --lint
|
34
|
-
|
35
|
-
|
36
|
-
Configuring Lint
|
37
|
-
----------------
|
38
|
-
|
39
|
-
In order to configure lint in the Project.meta file, just use the *LintPolicy* command, which forwards the supplied
|
40
|
-
the parameters to lint.
|
41
|
-
|
42
|
-
.. code-block:: text
|
43
|
-
|
44
|
-
DefaultToolchain GCC {
|
45
|
-
...
|
46
|
-
LintPolicy "$(ProjectDir)/lint/misra.lnt"
|
47
|
-
LintPolicy "$(ProjectDir)/lint/suppressions.lnt"
|
48
|
-
}
|
49
|
-
|
50
|
-
Example
|
51
|
-
+++++++
|
52
|
-
|
53
|
-
This example shows how to redirect the output to single xml files placed into the main project folder.
|
54
|
-
|
55
|
-
.. code-block:: text
|
56
|
-
|
57
|
-
DefaultToolchain GCC {
|
58
|
-
LintPolicy "-os($(MainProjectDir)/$(ProjectName)_$(ConfigName)_lintout.xml)"
|
59
|
-
LintPolicy "-v"
|
60
|
-
LintPolicy "+xml(doc)"
|
61
|
-
LintPolicy "-format=%f %l %t %n %m"
|
62
|
-
LintPolicy "-format_specific= "
|
63
|
-
LintPolicy "-pragma(message)"
|
64
|
-
...
|
65
|
-
}
|
66
|
-
|
67
|
-
|
68
|
-
Known Issues
|
69
|
-
------------
|
70
|
-
bake only searches for lint-nt.exe
|
71
|
-
+++++++++++++++++++++++++++++++++++
|
72
|
-
**Issue:**
|
73
|
-
bake currently does not search for all possible names of the lint application, it only searches for a file called *lint-nt.exe*.
|
74
|
-
|
75
|
-
**Solution:**
|
76
|
-
If you have another lint command (e.g. because you are using flexe lint on unix)
|
77
|
-
just create an symlink/alias which is called *lint-nt.exe*.
|
78
|
-
|
79
|
-
Lint fails due to missing compiler includes and defines
|
80
|
-
+++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
81
|
-
**Issue:**
|
82
|
-
Lint will fail if compiler internal includes and defines are missing.
|
83
|
-
|
84
|
-
**Solution:**
|
85
|
-
|
86
|
-
Lint comes with some helper files, handle this issue. In order to get a list of all needed
|
87
|
-
helper files e.g. for GCC, use the following command.
|
88
|
-
|
89
|
-
.. code-block:: console
|
90
|
-
|
91
|
-
User@Host:~$ make -f .../PcLint/../lnt/co-gcc.mak
|
92
|
-
|
93
|
-
You will get a output like this:
|
94
|
-
|
95
|
-
.. code-block:: text
|
96
|
-
|
97
|
-
gcc-include-path.lnt, lint_cmac.h, lint_cppmac.h and size-options.lnt.
|
98
|
-
|
99
|
-
You can now add the needed includes and LintPolicies (.lnt files) to your bake
|
100
|
-
configuration.
|
101
|
-
|
102
|
-
Lint error due to too many includes
|
103
|
-
+++++++++++++++++++++++++++++++++++
|
104
|
-
|
105
|
-
**Issue:**
|
106
|
-
In rare cases lint has problems if it has to open too many (include) files.
|
107
|
-
|
108
|
-
**Solution:**
|
109
|
-
You can use the *--lint-max* and the *--lint-min* options to get around this issue.
|
110
|
-
|
111
|
-
Example:
|
112
|
-
|
113
|
-
.. code-block:: console
|
114
|
-
|
115
|
-
User@Host:~$ bake Debug -p MyLibraryProject --lint --lint-max 50 #(lints the first 51 files)
|
116
|
-
User@Host:~$ bake Debug -p MyLibraryProject --lint --lint-min 51 --lint-max 100 #(lints the next 50 files)
|
117
|
-
User@Host:~$ bake Debug -p MyLibraryProject --lint --lint-min 101 #(lints the rest of the files)
|
118
|
-
|
119
|
-
|
120
|
-
.. Clang Analyze
|
121
|
-
.. *************
|
122
|
-
|
1
|
+
Static Code Analysis
|
2
|
+
====================
|
3
|
+
|
4
|
+
Static code analysis often is part or a pre step of the build, even though bake provides presteps which can be used to
|
5
|
+
add customized steps, we choose to add explicit support for static code analysis due to the fact that the analysis often
|
6
|
+
depends on information well known by the build system (include pahts, compiler flags, etc.). Currently bake has built in
|
7
|
+
support for *Pc-Lint*.
|
8
|
+
|
9
|
+
Lint
|
10
|
+
****
|
11
|
+
|
12
|
+
With bake you can lint LibraryConfigs, ExecutableConfigs, single files and the complete workspace (in this case the projects are linted separately).
|
13
|
+
The CPP Toolchain settings of the project are used regardless of the file type and file specific options.
|
14
|
+
It is possible to specify lnt-files with LintPolicy, but you can add every other lint command line option as well.
|
15
|
+
|
16
|
+
Basic Setup
|
17
|
+
-----------
|
18
|
+
|
19
|
+
#. Install `lint <http://www.gimpel.com/html/products.htm>`_.
|
20
|
+
#. Make sure the The lint executable 'lint-nt.exe' is in the path.
|
21
|
+
|
22
|
+
.. attention::
|
23
|
+
|
24
|
+
even though there is a unix version of pc-lint the asscoated binary name must be lint-nt.exe otherwise
|
25
|
+
it won't be recorgnized by the bake build system.
|
26
|
+
|
27
|
+
After doing this steps you are able to lint your build configurations (LibraryConfigs and ExecutableConfigs) using the *--lint* flag on the command line.
|
28
|
+
|
29
|
+
Example
|
30
|
+
+++++++
|
31
|
+
.. code-block:: console
|
32
|
+
|
33
|
+
User@Host:~$ bake Debug -p MyLibraryProject --lint
|
34
|
+
|
35
|
+
|
36
|
+
Configuring Lint
|
37
|
+
----------------
|
38
|
+
|
39
|
+
In order to configure lint in the Project.meta file, just use the *LintPolicy* command, which forwards the supplied
|
40
|
+
the parameters to lint.
|
41
|
+
|
42
|
+
.. code-block:: text
|
43
|
+
|
44
|
+
DefaultToolchain GCC {
|
45
|
+
...
|
46
|
+
LintPolicy "$(ProjectDir)/lint/misra.lnt"
|
47
|
+
LintPolicy "$(ProjectDir)/lint/suppressions.lnt"
|
48
|
+
}
|
49
|
+
|
50
|
+
Example
|
51
|
+
+++++++
|
52
|
+
|
53
|
+
This example shows how to redirect the output to single xml files placed into the main project folder.
|
54
|
+
|
55
|
+
.. code-block:: text
|
56
|
+
|
57
|
+
DefaultToolchain GCC {
|
58
|
+
LintPolicy "-os($(MainProjectDir)/$(ProjectName)_$(ConfigName)_lintout.xml)"
|
59
|
+
LintPolicy "-v"
|
60
|
+
LintPolicy "+xml(doc)"
|
61
|
+
LintPolicy "-format=%f %l %t %n %m"
|
62
|
+
LintPolicy "-format_specific= "
|
63
|
+
LintPolicy "-pragma(message)"
|
64
|
+
...
|
65
|
+
}
|
66
|
+
|
67
|
+
|
68
|
+
Known Issues
|
69
|
+
------------
|
70
|
+
bake only searches for lint-nt.exe
|
71
|
+
+++++++++++++++++++++++++++++++++++
|
72
|
+
**Issue:**
|
73
|
+
bake currently does not search for all possible names of the lint application, it only searches for a file called *lint-nt.exe*.
|
74
|
+
|
75
|
+
**Solution:**
|
76
|
+
If you have another lint command (e.g. because you are using flexe lint on unix)
|
77
|
+
just create an symlink/alias which is called *lint-nt.exe*.
|
78
|
+
|
79
|
+
Lint fails due to missing compiler includes and defines
|
80
|
+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
81
|
+
**Issue:**
|
82
|
+
Lint will fail if compiler internal includes and defines are missing.
|
83
|
+
|
84
|
+
**Solution:**
|
85
|
+
|
86
|
+
Lint comes with some helper files, handle this issue. In order to get a list of all needed
|
87
|
+
helper files e.g. for GCC, use the following command.
|
88
|
+
|
89
|
+
.. code-block:: console
|
90
|
+
|
91
|
+
User@Host:~$ make -f .../PcLint/../lnt/co-gcc.mak
|
92
|
+
|
93
|
+
You will get a output like this:
|
94
|
+
|
95
|
+
.. code-block:: text
|
96
|
+
|
97
|
+
gcc-include-path.lnt, lint_cmac.h, lint_cppmac.h and size-options.lnt.
|
98
|
+
|
99
|
+
You can now add the needed includes and LintPolicies (.lnt files) to your bake
|
100
|
+
configuration.
|
101
|
+
|
102
|
+
Lint error due to too many includes
|
103
|
+
+++++++++++++++++++++++++++++++++++
|
104
|
+
|
105
|
+
**Issue:**
|
106
|
+
In rare cases lint has problems if it has to open too many (include) files.
|
107
|
+
|
108
|
+
**Solution:**
|
109
|
+
You can use the *--lint-max* and the *--lint-min* options to get around this issue.
|
110
|
+
|
111
|
+
Example:
|
112
|
+
|
113
|
+
.. code-block:: console
|
114
|
+
|
115
|
+
User@Host:~$ bake Debug -p MyLibraryProject --lint --lint-max 50 #(lints the first 51 files)
|
116
|
+
User@Host:~$ bake Debug -p MyLibraryProject --lint --lint-min 51 --lint-max 100 #(lints the next 50 files)
|
117
|
+
User@Host:~$ bake Debug -p MyLibraryProject --lint --lint-min 101 #(lints the rest of the files)
|
118
|
+
|
119
|
+
|
120
|
+
.. Clang Analyze
|
121
|
+
.. *************
|
122
|
+
|
@@ -1,72 +1,72 @@
|
|
1
|
-
The Bakery
|
2
|
-
==========
|
3
|
-
|
4
|
-
What is the Bakery
|
5
|
-
******************
|
6
|
-
bakery is part of the bake-toolkit distribution and it is used to build several independent projects at once.
|
7
|
-
It's very useful for e.g. compiling and running all unit tests.
|
8
|
-
The collections are specified in Collection.meta files.
|
9
|
-
|
10
|
-
How to use the Bakery on the commandline
|
11
|
-
****************************************
|
12
|
-
Call *bakery -h* to display the command line options.
|
13
|
-
The most important options are the collection name (*-b*) and the collection directory (*-m*, default is current directory).
|
14
|
-
|
15
|
-
Examples:
|
16
|
-
|
17
|
-
Build all unittests:
|
18
|
-
|
19
|
-
.. code-block:: console
|
20
|
-
|
21
|
-
bakery -b AllUnitTests
|
22
|
-
|
23
|
-
It is possible to omit *-b*:
|
24
|
-
|
25
|
-
.. code-block:: console
|
26
|
-
|
27
|
-
bakery AllUnitTests
|
28
|
-
|
29
|
-
Clean all unittests:
|
30
|
-
|
31
|
-
.. code-block:: console
|
32
|
-
|
33
|
-
bakery -b AllUnitTests -c
|
34
|
-
|
35
|
-
Build all unittests, workspace checked out into two roots, console supports colors, stop on first error, run the unittests after build:
|
36
|
-
|
37
|
-
.. code-block:: console
|
38
|
-
|
39
|
-
bakery -b AllUnitTests -m w:/root1/mainProj -w w:/root2 -r -a black --do run
|
40
|
-
|
41
|
-
|
42
|
-
Syntax of Collection.meta
|
43
|
-
*************************
|
44
|
-
Move the mouse cursor over the blue elements to display more information.
|
45
|
-
|
46
|
-
.. raw:: html
|
47
|
-
:file: ../_static/syntax_collection_meta.html
|
48
|
-
|
49
|
-
.. note::
|
50
|
-
|
51
|
-
* Use double quotes (") if the strings have wildcards
|
52
|
-
* Use hash marks (#) for comments.
|
53
|
-
|
54
|
-
Example:
|
55
|
-
|
56
|
-
.. code-block:: text
|
57
|
-
|
58
|
-
Collection AllUnitTests {
|
59
|
-
Project "*", config: UnitTest
|
60
|
-
}
|
61
|
-
Collection UnitTestLibsWithoutBsp {
|
62
|
-
Project "*", config: "UnitTestLib*"
|
63
|
-
Exclude "bsp*", config: "*"
|
64
|
-
}
|
65
|
-
Collection MySpecialCollection {
|
66
|
-
Project Main1, config: Debug
|
67
|
-
Project Main2, config: Release
|
68
|
-
Project Sub3, config: Debug
|
69
|
-
SubCollection UnitTestLibsWithoutBsp
|
70
|
-
}
|
71
|
-
|
72
|
-
|
1
|
+
The Bakery
|
2
|
+
==========
|
3
|
+
|
4
|
+
What is the Bakery
|
5
|
+
******************
|
6
|
+
bakery is part of the bake-toolkit distribution and it is used to build several independent projects at once.
|
7
|
+
It's very useful for e.g. compiling and running all unit tests.
|
8
|
+
The collections are specified in Collection.meta files.
|
9
|
+
|
10
|
+
How to use the Bakery on the commandline
|
11
|
+
****************************************
|
12
|
+
Call *bakery -h* to display the command line options.
|
13
|
+
The most important options are the collection name (*-b*) and the collection directory (*-m*, default is current directory).
|
14
|
+
|
15
|
+
Examples:
|
16
|
+
|
17
|
+
Build all unittests:
|
18
|
+
|
19
|
+
.. code-block:: console
|
20
|
+
|
21
|
+
bakery -b AllUnitTests
|
22
|
+
|
23
|
+
It is possible to omit *-b*:
|
24
|
+
|
25
|
+
.. code-block:: console
|
26
|
+
|
27
|
+
bakery AllUnitTests
|
28
|
+
|
29
|
+
Clean all unittests:
|
30
|
+
|
31
|
+
.. code-block:: console
|
32
|
+
|
33
|
+
bakery -b AllUnitTests -c
|
34
|
+
|
35
|
+
Build all unittests, workspace checked out into two roots, console supports colors, stop on first error, run the unittests after build:
|
36
|
+
|
37
|
+
.. code-block:: console
|
38
|
+
|
39
|
+
bakery -b AllUnitTests -m w:/root1/mainProj -w w:/root2 -r -a black --do run
|
40
|
+
|
41
|
+
|
42
|
+
Syntax of Collection.meta
|
43
|
+
*************************
|
44
|
+
Move the mouse cursor over the blue elements to display more information.
|
45
|
+
|
46
|
+
.. raw:: html
|
47
|
+
:file: ../_static/syntax_collection_meta.html
|
48
|
+
|
49
|
+
.. note::
|
50
|
+
|
51
|
+
* Use double quotes (") if the strings have wildcards
|
52
|
+
* Use hash marks (#) for comments.
|
53
|
+
|
54
|
+
Example:
|
55
|
+
|
56
|
+
.. code-block:: text
|
57
|
+
|
58
|
+
Collection AllUnitTests {
|
59
|
+
Project "*", config: UnitTest
|
60
|
+
}
|
61
|
+
Collection UnitTestLibsWithoutBsp {
|
62
|
+
Project "*", config: "UnitTestLib*"
|
63
|
+
Exclude "bsp*", config: "*"
|
64
|
+
}
|
65
|
+
Collection MySpecialCollection {
|
66
|
+
Project Main1, config: Debug
|
67
|
+
Project Main2, config: Release
|
68
|
+
Project Sub3, config: Debug
|
69
|
+
SubCollection UnitTestLibsWithoutBsp
|
70
|
+
}
|
71
|
+
|
72
|
+
|
@@ -1,43 +1,43 @@
|
|
1
|
-
Clang Analyze
|
2
|
-
*************
|
3
|
-
|
4
|
-
bake can be easily used to analyze source files with Clang. It works simliar to regular compiling, but instead of
|
5
|
-
invoking the compiler, the Clang Analyzer will be called.
|
6
|
-
|
7
|
-
Imagine you have a workspace with the following "main" project:
|
8
|
-
|
9
|
-
.. code-block:: console
|
10
|
-
|
11
|
-
Project {
|
12
|
-
...
|
13
|
-
ExecutableConfig Debug {
|
14
|
-
...
|
15
|
-
DefaultToolchain GCC
|
16
|
-
}
|
17
|
-
}
|
18
|
-
|
19
|
-
Either edit this Project.meta or create a new "analyze" project:
|
20
|
-
|
21
|
-
.. code-block:: console
|
22
|
-
|
23
|
-
Project {
|
24
|
-
CustomConfig Analyze {
|
25
|
-
Dependency main, config: Debug
|
26
|
-
DefaultToolchain CLANG_ANALYZE {
|
27
|
-
Compiler CPP {
|
28
|
-
Flags "-analyzer-checker=deadcode,security,alpha,unix,cplusplus"
|
29
|
-
}
|
30
|
-
Compiler C {
|
31
|
-
Flags "-analyzer-checker=deadcode,security,alpha,unix"
|
32
|
-
}
|
33
|
-
}
|
34
|
-
}
|
35
|
-
}
|
36
|
-
|
37
|
-
As you can see the DefaultToolchain GCC is replaced with CLANG_ANALYZE. Call bake like this:
|
38
|
-
|
39
|
-
.. code-block:: console
|
40
|
-
|
41
|
-
bake Analyze -f .
|
42
|
-
|
43
|
-
"-f" means that only the compilation step will take place. The "." means files with a "." in the name will be compiled (= all files). If you want to analyze only C++ files, you can write "-f .cpp"
|
1
|
+
Clang Analyze
|
2
|
+
*************
|
3
|
+
|
4
|
+
bake can be easily used to analyze source files with Clang. It works simliar to regular compiling, but instead of
|
5
|
+
invoking the compiler, the Clang Analyzer will be called.
|
6
|
+
|
7
|
+
Imagine you have a workspace with the following "main" project:
|
8
|
+
|
9
|
+
.. code-block:: console
|
10
|
+
|
11
|
+
Project {
|
12
|
+
...
|
13
|
+
ExecutableConfig Debug {
|
14
|
+
...
|
15
|
+
DefaultToolchain GCC
|
16
|
+
}
|
17
|
+
}
|
18
|
+
|
19
|
+
Either edit this Project.meta or create a new "analyze" project:
|
20
|
+
|
21
|
+
.. code-block:: console
|
22
|
+
|
23
|
+
Project {
|
24
|
+
CustomConfig Analyze {
|
25
|
+
Dependency main, config: Debug
|
26
|
+
DefaultToolchain CLANG_ANALYZE {
|
27
|
+
Compiler CPP {
|
28
|
+
Flags "-analyzer-checker=deadcode,security,alpha,unix,cplusplus"
|
29
|
+
}
|
30
|
+
Compiler C {
|
31
|
+
Flags "-analyzer-checker=deadcode,security,alpha,unix"
|
32
|
+
}
|
33
|
+
}
|
34
|
+
}
|
35
|
+
}
|
36
|
+
|
37
|
+
As you can see the DefaultToolchain GCC is replaced with CLANG_ANALYZE. Call bake like this:
|
38
|
+
|
39
|
+
.. code-block:: console
|
40
|
+
|
41
|
+
bake Analyze -f .
|
42
|
+
|
43
|
+
"-f" means that only the compilation step will take place. The "." means files with a "." in the name will be compiled (= all files). If you want to analyze only C++ files, you can write "-f .cpp"
|