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,44 +1,44 @@
|
|
|
1
|
-
require 'bake/toolchain/errorparser/error_parser'
|
|
2
|
-
|
|
3
|
-
module Bake
|
|
4
|
-
class GreenHillsLinkerErrorParser < ErrorParser
|
|
5
|
-
|
|
6
|
-
# detect this:
|
|
7
|
-
|
|
8
|
-
# C++ prelinker: recompiling "x/y.z"
|
|
9
|
-
# "blah.h", line 1: warning #123-D: expression has no effect
|
|
10
|
-
# uiuiui
|
|
11
|
-
# ^
|
|
12
|
-
# detected during:
|
|
13
|
-
# instantiation of ...
|
|
14
|
-
|
|
15
|
-
# dblink: WARNING: 10 problems were encountered while processing debug information, see "Debug/xy.dle" for details.
|
|
16
|
-
|
|
17
|
-
def initialize()
|
|
18
|
-
@error_expression = /ld: (.+)/
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
def scan_lines(consoleOutput, proj_dir)
|
|
22
|
-
res = []
|
|
23
|
-
error_severity = 255
|
|
24
|
-
consoleOutput[0].each_line do |l|
|
|
25
|
-
l.rstrip!
|
|
26
|
-
d = ErrorDesc.new
|
|
27
|
-
scan_res = l.scan(@error_expression)
|
|
28
|
-
if scan_res.length == 0 # msg will end with the beginning of the next message
|
|
29
|
-
d.severity = error_severity
|
|
30
|
-
d.message = l
|
|
31
|
-
elsif scan_res.length > 0
|
|
32
|
-
d.file_name = proj_dir
|
|
33
|
-
d.line_number = 0
|
|
34
|
-
d.message = scan_res[0][0]
|
|
35
|
-
d.severity = SEVERITY_ERROR
|
|
36
|
-
error_severity = d.severity
|
|
37
|
-
end
|
|
38
|
-
res << d
|
|
39
|
-
end
|
|
40
|
-
[res, consoleOutput[0]]
|
|
41
|
-
end
|
|
42
|
-
|
|
43
|
-
end
|
|
44
|
-
end
|
|
1
|
+
require 'bake/toolchain/errorparser/error_parser'
|
|
2
|
+
|
|
3
|
+
module Bake
|
|
4
|
+
class GreenHillsLinkerErrorParser < ErrorParser
|
|
5
|
+
|
|
6
|
+
# detect this:
|
|
7
|
+
|
|
8
|
+
# C++ prelinker: recompiling "x/y.z"
|
|
9
|
+
# "blah.h", line 1: warning #123-D: expression has no effect
|
|
10
|
+
# uiuiui
|
|
11
|
+
# ^
|
|
12
|
+
# detected during:
|
|
13
|
+
# instantiation of ...
|
|
14
|
+
|
|
15
|
+
# dblink: WARNING: 10 problems were encountered while processing debug information, see "Debug/xy.dle" for details.
|
|
16
|
+
|
|
17
|
+
def initialize()
|
|
18
|
+
@error_expression = /ld: (.+)/
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def scan_lines(consoleOutput, proj_dir)
|
|
22
|
+
res = []
|
|
23
|
+
error_severity = 255
|
|
24
|
+
consoleOutput[0].each_line do |l|
|
|
25
|
+
l.rstrip!
|
|
26
|
+
d = ErrorDesc.new
|
|
27
|
+
scan_res = l.scan(@error_expression)
|
|
28
|
+
if scan_res.length == 0 # msg will end with the beginning of the next message
|
|
29
|
+
d.severity = error_severity
|
|
30
|
+
d.message = l
|
|
31
|
+
elsif scan_res.length > 0
|
|
32
|
+
d.file_name = proj_dir
|
|
33
|
+
d.line_number = 0
|
|
34
|
+
d.message = scan_res[0][0]
|
|
35
|
+
d.severity = SEVERITY_ERROR
|
|
36
|
+
error_severity = d.severity
|
|
37
|
+
end
|
|
38
|
+
res << d
|
|
39
|
+
end
|
|
40
|
+
[res, consoleOutput[0]]
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
end
|
|
44
|
+
end
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
require 'bake/toolchain/errorparser/error_parser'
|
|
2
|
-
|
|
3
|
-
module Bake
|
|
4
|
-
class KeilCompilerErrorParser < ErrorParser
|
|
5
|
-
|
|
6
|
-
def initialize()
|
|
7
|
-
@error_expression_start = /\"(.+)\", line ([0-9]+): (?!included)(catastrophic |fatal )*([A-Za-z]+)[:]* (.+)/
|
|
8
|
-
@error_expression_end = /^[ \t]*\^/ # well, it may end without "^"... in this case the error will last the next one starts or console text ends
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
def scan_lines(consoleOutput, proj_dir)
|
|
12
|
-
res = []
|
|
13
|
-
error_severity = 255
|
|
14
|
-
consoleOutputFullnames = ""
|
|
15
|
-
consoleOutput[0].each_line do |l|
|
|
16
|
-
d = ErrorDesc.new
|
|
17
|
-
lstripped = l.rstrip
|
|
18
|
-
scan_res = lstripped.scan(@error_expression_start)
|
|
19
|
-
if scan_res.length == 0
|
|
20
|
-
d.severity = error_severity
|
|
21
|
-
d.message = lstripped
|
|
22
|
-
if lstripped.scan(@error_expression_end).length > 0
|
|
23
|
-
error_severity = 255
|
|
24
|
-
end
|
|
25
|
-
else
|
|
26
|
-
d.file_name = File.expand_path(scan_res[0][0])
|
|
27
|
-
d.line_number = scan_res[0][1].to_i
|
|
28
|
-
d.message = scan_res[0][4]
|
|
29
|
-
d.severity = get_severity(scan_res[0][3])
|
|
30
|
-
error_severity = d.severity
|
|
31
|
-
l.gsub!(scan_res[0][0],d.file_name)
|
|
32
|
-
end
|
|
33
|
-
res << d
|
|
34
|
-
consoleOutputFullnames << l
|
|
35
|
-
end
|
|
36
|
-
[res, consoleOutputFullnames]
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
end
|
|
40
|
-
end
|
|
1
|
+
require 'bake/toolchain/errorparser/error_parser'
|
|
2
|
+
|
|
3
|
+
module Bake
|
|
4
|
+
class KeilCompilerErrorParser < ErrorParser
|
|
5
|
+
|
|
6
|
+
def initialize()
|
|
7
|
+
@error_expression_start = /\"(.+)\", line ([0-9]+): (?!included)(catastrophic |fatal )*([A-Za-z]+)[:]* (.+)/
|
|
8
|
+
@error_expression_end = /^[ \t]*\^/ # well, it may end without "^"... in this case the error will last the next one starts or console text ends
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def scan_lines(consoleOutput, proj_dir)
|
|
12
|
+
res = []
|
|
13
|
+
error_severity = 255
|
|
14
|
+
consoleOutputFullnames = ""
|
|
15
|
+
consoleOutput[0].each_line do |l|
|
|
16
|
+
d = ErrorDesc.new
|
|
17
|
+
lstripped = l.rstrip
|
|
18
|
+
scan_res = lstripped.scan(@error_expression_start)
|
|
19
|
+
if scan_res.length == 0
|
|
20
|
+
d.severity = error_severity
|
|
21
|
+
d.message = lstripped
|
|
22
|
+
if lstripped.scan(@error_expression_end).length > 0
|
|
23
|
+
error_severity = 255
|
|
24
|
+
end
|
|
25
|
+
else
|
|
26
|
+
d.file_name = File.expand_path(scan_res[0][0])
|
|
27
|
+
d.line_number = scan_res[0][1].to_i
|
|
28
|
+
d.message = scan_res[0][4]
|
|
29
|
+
d.severity = get_severity(scan_res[0][3])
|
|
30
|
+
error_severity = d.severity
|
|
31
|
+
l.gsub!(scan_res[0][0],d.file_name)
|
|
32
|
+
end
|
|
33
|
+
res << d
|
|
34
|
+
consoleOutputFullnames << l
|
|
35
|
+
end
|
|
36
|
+
[res, consoleOutputFullnames]
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
require 'bake/toolchain/errorparser/error_parser'
|
|
2
|
-
|
|
3
|
-
module Bake
|
|
4
|
-
class KeilLinkerErrorParser < ErrorParser
|
|
5
|
-
|
|
6
|
-
def initialize()
|
|
7
|
-
@error_expression = /([^:]+): (L[0-9]+[A-Z]: .+)/
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
def scan_lines(consoleOutput, proj_dir)
|
|
11
|
-
res = []
|
|
12
|
-
consoleOutput[0].each_line do |l|
|
|
13
|
-
l.rstrip!
|
|
14
|
-
d = ErrorDesc.new
|
|
15
|
-
scan_res = l.scan(@error_expression)
|
|
16
|
-
if scan_res.length > 0
|
|
17
|
-
d.file_name = proj_dir
|
|
18
|
-
d.line_number = 0
|
|
19
|
-
d.message = scan_res[0][1]
|
|
20
|
-
d.severity = get_severity(scan_res[0][0])
|
|
21
|
-
error_severity = d.severity
|
|
22
|
-
end
|
|
23
|
-
res << d
|
|
24
|
-
end
|
|
25
|
-
[res, consoleOutput[0]]
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
end
|
|
30
|
-
end
|
|
1
|
+
require 'bake/toolchain/errorparser/error_parser'
|
|
2
|
+
|
|
3
|
+
module Bake
|
|
4
|
+
class KeilLinkerErrorParser < ErrorParser
|
|
5
|
+
|
|
6
|
+
def initialize()
|
|
7
|
+
@error_expression = /([^:]+): (L[0-9]+[A-Z]: .+)/
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def scan_lines(consoleOutput, proj_dir)
|
|
11
|
+
res = []
|
|
12
|
+
consoleOutput[0].each_line do |l|
|
|
13
|
+
l.rstrip!
|
|
14
|
+
d = ErrorDesc.new
|
|
15
|
+
scan_res = l.scan(@error_expression)
|
|
16
|
+
if scan_res.length > 0
|
|
17
|
+
d.file_name = proj_dir
|
|
18
|
+
d.line_number = 0
|
|
19
|
+
d.message = scan_res[0][1]
|
|
20
|
+
d.severity = get_severity(scan_res[0][0])
|
|
21
|
+
error_severity = d.severity
|
|
22
|
+
end
|
|
23
|
+
res << d
|
|
24
|
+
end
|
|
25
|
+
[res, consoleOutput[0]]
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
require 'bake/toolchain/errorparser/error_parser'
|
|
2
|
-
|
|
3
|
-
module Bake
|
|
4
|
-
class LintErrorParser < ErrorParser
|
|
5
|
-
|
|
6
|
-
def initialize()
|
|
7
|
-
@error_expression = /([^:]*):([0-9]+): ([A-Za-z]+)[ ]*(.+)/
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
def scan_lines(consoleOutput, proj_dir)
|
|
11
|
-
res = []
|
|
12
|
-
consoleOutputFullnames = ""
|
|
13
|
-
consoleOutput[0].each_line do |l|
|
|
14
|
-
d = ErrorDesc.new
|
|
15
|
-
scan_res = l.gsub(/\r\n?/, "").scan(@error_expression)
|
|
16
|
-
if scan_res.length > 0
|
|
17
|
-
if (scan_res[0][0] == "")
|
|
18
|
-
d.file_name = proj_dir
|
|
19
|
-
else
|
|
20
|
-
d.file_name = File.expand_path(scan_res[0][0])
|
|
21
|
-
end
|
|
22
|
-
d.line_number = scan_res[0][1].to_i
|
|
23
|
-
d.severity = get_severity(scan_res[0][2])
|
|
24
|
-
d.message = scan_res[0][3]
|
|
25
|
-
l.gsub!(scan_res[0][0],d.file_name)
|
|
26
|
-
end
|
|
27
|
-
res << d
|
|
28
|
-
consoleOutputFullnames << l
|
|
29
|
-
end
|
|
30
|
-
[res, consoleOutputFullnames]
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
end
|
|
34
|
-
end
|
|
1
|
+
require 'bake/toolchain/errorparser/error_parser'
|
|
2
|
+
|
|
3
|
+
module Bake
|
|
4
|
+
class LintErrorParser < ErrorParser
|
|
5
|
+
|
|
6
|
+
def initialize()
|
|
7
|
+
@error_expression = /([^:]*):([0-9]+): ([A-Za-z]+)[ ]*(.+)/
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def scan_lines(consoleOutput, proj_dir)
|
|
11
|
+
res = []
|
|
12
|
+
consoleOutputFullnames = ""
|
|
13
|
+
consoleOutput[0].each_line do |l|
|
|
14
|
+
d = ErrorDesc.new
|
|
15
|
+
scan_res = l.gsub(/\r\n?/, "").scan(@error_expression)
|
|
16
|
+
if scan_res.length > 0
|
|
17
|
+
if (scan_res[0][0] == "")
|
|
18
|
+
d.file_name = proj_dir
|
|
19
|
+
else
|
|
20
|
+
d.file_name = File.expand_path(scan_res[0][0])
|
|
21
|
+
end
|
|
22
|
+
d.line_number = scan_res[0][1].to_i
|
|
23
|
+
d.severity = get_severity(scan_res[0][2])
|
|
24
|
+
d.message = scan_res[0][3]
|
|
25
|
+
l.gsub!(scan_res[0][0],d.file_name)
|
|
26
|
+
end
|
|
27
|
+
res << d
|
|
28
|
+
consoleOutputFullnames << l
|
|
29
|
+
end
|
|
30
|
+
[res, consoleOutputFullnames]
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
require 'bake/toolchain/errorparser/error_parser'
|
|
2
|
-
|
|
3
|
-
module Bake
|
|
4
|
-
class MSVCCompilerErrorParser < ErrorParser
|
|
5
|
-
|
|
6
|
-
def initialize()
|
|
7
|
-
@error_expression = /(.+)\(([0-9]+)\) : ([A-Za-z\._]+) (C[\d]+: .+)/
|
|
8
|
-
@incEng = "Note: including file: "
|
|
9
|
-
@incGer = "Hinweis: Einlesen der Datei: "
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
def scan_lines(consoleOutput, proj_dir)
|
|
13
|
-
includeList = []
|
|
14
|
-
res = []
|
|
15
|
-
consoleOutputFiltered = ""
|
|
16
|
-
consoleOutputFullnames = ""
|
|
17
|
-
filterLine = 0
|
|
18
|
-
consoleOutput[0].each_line do |l|
|
|
19
|
-
filterLine = filterLine + 1
|
|
20
|
-
next if (filterLine == 1 and l.include?"Assembling: ")
|
|
21
|
-
if (filterLine <= 2 and l.include?"Microsoft (R)")
|
|
22
|
-
filterLine = 1
|
|
23
|
-
next
|
|
24
|
-
end
|
|
25
|
-
next if (filterLine == 2 and l.include?"Copyright (C)")
|
|
26
|
-
next if (filterLine == 3 and l.strip.empty?)
|
|
27
|
-
next if (filterLine == 4 and not l.include?" : " and l.include?".") # the source file
|
|
28
|
-
filterLine = 100
|
|
29
|
-
|
|
30
|
-
if l.include?@incEng
|
|
31
|
-
includeList << l[@incEng.length..-1].strip
|
|
32
|
-
next
|
|
33
|
-
end
|
|
34
|
-
if l.include?@incGer
|
|
35
|
-
includeList << l[@incGer.length..-1].strip
|
|
36
|
-
next
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
d = ErrorDesc.new
|
|
40
|
-
scan_res = l.gsub(/\r\n?/, "").scan(@error_expression)
|
|
41
|
-
lFull = l
|
|
42
|
-
if scan_res.length > 0
|
|
43
|
-
d.file_name = File.expand_path(scan_res[0][0])
|
|
44
|
-
d.line_number = scan_res[0][1].to_i
|
|
45
|
-
d.message = scan_res[0][3]
|
|
46
|
-
if (scan_res[0][2].include?".")
|
|
47
|
-
d.severity = SEVERITY_ERROR
|
|
48
|
-
d.message = scan_res[0][2] + ": " + d.message
|
|
49
|
-
else
|
|
50
|
-
d.severity = get_severity(scan_res[0][2])
|
|
51
|
-
end
|
|
52
|
-
lFull = l.gsub(scan_res[0][0],d.file_name)
|
|
53
|
-
end
|
|
54
|
-
res << d
|
|
55
|
-
consoleOutputFiltered << l
|
|
56
|
-
consoleOutputFullnames << lFull
|
|
57
|
-
end
|
|
58
|
-
consoleOutput[0] = consoleOutputFiltered
|
|
59
|
-
[res, consoleOutputFullnames, includeList.uniq]
|
|
60
|
-
end
|
|
61
|
-
|
|
62
|
-
end
|
|
63
|
-
end
|
|
1
|
+
require 'bake/toolchain/errorparser/error_parser'
|
|
2
|
+
|
|
3
|
+
module Bake
|
|
4
|
+
class MSVCCompilerErrorParser < ErrorParser
|
|
5
|
+
|
|
6
|
+
def initialize()
|
|
7
|
+
@error_expression = /(.+)\(([0-9]+)\) : ([A-Za-z\._]+) (C[\d]+: .+)/
|
|
8
|
+
@incEng = "Note: including file: "
|
|
9
|
+
@incGer = "Hinweis: Einlesen der Datei: "
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def scan_lines(consoleOutput, proj_dir)
|
|
13
|
+
includeList = []
|
|
14
|
+
res = []
|
|
15
|
+
consoleOutputFiltered = ""
|
|
16
|
+
consoleOutputFullnames = ""
|
|
17
|
+
filterLine = 0
|
|
18
|
+
consoleOutput[0].each_line do |l|
|
|
19
|
+
filterLine = filterLine + 1
|
|
20
|
+
next if (filterLine == 1 and l.include?"Assembling: ")
|
|
21
|
+
if (filterLine <= 2 and l.include?"Microsoft (R)")
|
|
22
|
+
filterLine = 1
|
|
23
|
+
next
|
|
24
|
+
end
|
|
25
|
+
next if (filterLine == 2 and l.include?"Copyright (C)")
|
|
26
|
+
next if (filterLine == 3 and l.strip.empty?)
|
|
27
|
+
next if (filterLine == 4 and not l.include?" : " and l.include?".") # the source file
|
|
28
|
+
filterLine = 100
|
|
29
|
+
|
|
30
|
+
if l.include?@incEng
|
|
31
|
+
includeList << l[@incEng.length..-1].strip
|
|
32
|
+
next
|
|
33
|
+
end
|
|
34
|
+
if l.include?@incGer
|
|
35
|
+
includeList << l[@incGer.length..-1].strip
|
|
36
|
+
next
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
d = ErrorDesc.new
|
|
40
|
+
scan_res = l.gsub(/\r\n?/, "").scan(@error_expression)
|
|
41
|
+
lFull = l
|
|
42
|
+
if scan_res.length > 0
|
|
43
|
+
d.file_name = File.expand_path(scan_res[0][0])
|
|
44
|
+
d.line_number = scan_res[0][1].to_i
|
|
45
|
+
d.message = scan_res[0][3]
|
|
46
|
+
if (scan_res[0][2].include?".")
|
|
47
|
+
d.severity = SEVERITY_ERROR
|
|
48
|
+
d.message = scan_res[0][2] + ": " + d.message
|
|
49
|
+
else
|
|
50
|
+
d.severity = get_severity(scan_res[0][2])
|
|
51
|
+
end
|
|
52
|
+
lFull = l.gsub(scan_res[0][0],d.file_name)
|
|
53
|
+
end
|
|
54
|
+
res << d
|
|
55
|
+
consoleOutputFiltered << l
|
|
56
|
+
consoleOutputFullnames << lFull
|
|
57
|
+
end
|
|
58
|
+
consoleOutput[0] = consoleOutputFiltered
|
|
59
|
+
[res, consoleOutputFullnames, includeList.uniq]
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
end
|
|
63
|
+
end
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
require 'bake/toolchain/errorparser/error_parser'
|
|
2
|
-
|
|
3
|
-
module Bake
|
|
4
|
-
class MSVCLinkerErrorParser < ErrorParser
|
|
5
|
-
|
|
6
|
-
def initialize()
|
|
7
|
-
# todo: is every line an error?
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
def scan_lines(consoleOutput, proj_dir)
|
|
11
|
-
res = []
|
|
12
|
-
consoleOutputFiltered = ""
|
|
13
|
-
filterLine = 0
|
|
14
|
-
|
|
15
|
-
consoleOutput[0].each_line do |l|
|
|
16
|
-
filterLine = filterLine + 1
|
|
17
|
-
next if (filterLine == 1 and l.include?"Microsoft (R)")
|
|
18
|
-
next if (filterLine == 2 and l.include?"Copyright (C)")
|
|
19
|
-
next if (filterLine == 3 and l.strip.empty?)
|
|
20
|
-
|
|
21
|
-
l.rstrip!
|
|
22
|
-
d = ErrorDesc.new
|
|
23
|
-
d.file_name = proj_dir
|
|
24
|
-
d.line_number = 0
|
|
25
|
-
d.message = l
|
|
26
|
-
if l.length == 0
|
|
27
|
-
d.severity = SEVERITY_OK
|
|
28
|
-
elsif l.include?" Warning:"
|
|
29
|
-
d.severity = SEVERITY_WARNING
|
|
30
|
-
else
|
|
31
|
-
d.severity = SEVERITY_ERROR
|
|
32
|
-
end
|
|
33
|
-
consoleOutputFiltered << l
|
|
34
|
-
res << d
|
|
35
|
-
end
|
|
36
|
-
consoleOutput[0] = consoleOutputFiltered
|
|
37
|
-
[res, consoleOutput[0]]
|
|
38
|
-
end
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
end
|
|
42
|
-
end
|
|
1
|
+
require 'bake/toolchain/errorparser/error_parser'
|
|
2
|
+
|
|
3
|
+
module Bake
|
|
4
|
+
class MSVCLinkerErrorParser < ErrorParser
|
|
5
|
+
|
|
6
|
+
def initialize()
|
|
7
|
+
# todo: is every line an error?
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def scan_lines(consoleOutput, proj_dir)
|
|
11
|
+
res = []
|
|
12
|
+
consoleOutputFiltered = ""
|
|
13
|
+
filterLine = 0
|
|
14
|
+
|
|
15
|
+
consoleOutput[0].each_line do |l|
|
|
16
|
+
filterLine = filterLine + 1
|
|
17
|
+
next if (filterLine == 1 and l.include?"Microsoft (R)")
|
|
18
|
+
next if (filterLine == 2 and l.include?"Copyright (C)")
|
|
19
|
+
next if (filterLine == 3 and l.strip.empty?)
|
|
20
|
+
|
|
21
|
+
l.rstrip!
|
|
22
|
+
d = ErrorDesc.new
|
|
23
|
+
d.file_name = proj_dir
|
|
24
|
+
d.line_number = 0
|
|
25
|
+
d.message = l
|
|
26
|
+
if l.length == 0
|
|
27
|
+
d.severity = SEVERITY_OK
|
|
28
|
+
elsif l.include?" Warning:"
|
|
29
|
+
d.severity = SEVERITY_WARNING
|
|
30
|
+
else
|
|
31
|
+
d.severity = SEVERITY_ERROR
|
|
32
|
+
end
|
|
33
|
+
consoleOutputFiltered << l
|
|
34
|
+
res << d
|
|
35
|
+
end
|
|
36
|
+
consoleOutput[0] = consoleOutputFiltered
|
|
37
|
+
[res, consoleOutput[0]]
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
end
|
|
42
|
+
end
|