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.
Files changed (139) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile.rb +3 -3
  3. data/bin/bake +46 -46
  4. data/bin/bake-doc +11 -11
  5. data/bin/bakery +179 -179
  6. data/bin/createVSProjects +213 -213
  7. data/documentation/_build/html/_sources/changelog.txt +456 -451
  8. data/documentation/_build/html/_sources/commandline/commandline.txt +107 -107
  9. data/documentation/_build/html/_sources/concepts/build_hierarchy.txt +34 -34
  10. data/documentation/_build/html/_sources/concepts/concepts.txt +14 -14
  11. data/documentation/_build/html/_sources/concepts/inject.txt +65 -65
  12. data/documentation/_build/html/_sources/concepts/link_order.txt +91 -91
  13. data/documentation/_build/html/_sources/concepts/prebuild.txt +56 -56
  14. data/documentation/_build/html/_sources/concepts/the_main_project.txt +45 -45
  15. data/documentation/_build/html/_sources/concepts/the_project_meta_file.txt +72 -72
  16. data/documentation/_build/html/_sources/ide/eclipse/eclipse.txt +25 -25
  17. data/documentation/_build/html/_sources/ide/eclipse/how_to_convert_existing_cdt_workspace.txt +31 -31
  18. data/documentation/_build/html/_sources/ide/eclipse/how_to_create_a_new_project_in_eclipse.txt +18 -18
  19. data/documentation/_build/html/_sources/ide/eclipse/how_to_create_a_workspace_in_eclipse.txt +27 -27
  20. data/documentation/_build/html/_sources/ide/eclipse/how_to_debug_in_eclipse.txt +38 -38
  21. data/documentation/_build/html/_sources/ide/eclipse/how_to_install_eclipse_plugin.txt +44 -44
  22. data/documentation/_build/html/_sources/ide/eclipse/how_to_use_bake_in_eclipse.txt +86 -86
  23. data/documentation/_build/html/_sources/ide/ide_integrations.txt +8 -8
  24. data/documentation/_build/html/_sources/ide/vs/how_to_create_vs_projects.txt +15 -15
  25. data/documentation/_build/html/_sources/ide/vs/how_to_debug_in_vs.txt +35 -35
  26. data/documentation/_build/html/_sources/ide/vs/how_to_used_bake_in_vs.txt +35 -35
  27. data/documentation/_build/html/_sources/ide/vs/vs.txt +10 -10
  28. data/documentation/_build/html/_sources/ide/vs/vs_install.txt +43 -43
  29. data/documentation/_build/html/_sources/index.txt +33 -33
  30. data/documentation/_build/html/_sources/install/install_bake.txt +112 -112
  31. data/documentation/_build/html/_sources/internal.txt +50 -50
  32. data/documentation/_build/html/_sources/known_issues.txt +9 -9
  33. data/documentation/_build/html/_sources/license.txt +4 -4
  34. data/documentation/_build/html/_sources/performance/performance.txt +104 -104
  35. data/documentation/_build/html/_sources/quickstart/quickstart.txt +70 -70
  36. data/documentation/_build/html/_sources/syntax/adapt_configs.txt +143 -143
  37. data/documentation/_build/html/_sources/syntax/auto_adjustment.txt +43 -43
  38. data/documentation/_build/html/_sources/syntax/derive_configs.txt +93 -94
  39. data/documentation/_build/html/_sources/syntax/project_meta_syntax.txt +19 -19
  40. data/documentation/_build/html/_sources/syntax/syntax.txt +11 -11
  41. data/documentation/_build/html/_sources/syntax/variable_substitutions.txt +147 -147
  42. data/documentation/_build/html/_sources/tips_and_tricks/dot.txt +34 -34
  43. data/documentation/_build/html/_sources/tips_and_tricks/how_to_use_bake_with_cygwin.txt +62 -62
  44. data/documentation/_build/html/_sources/tips_and_tricks/static_code_analysis.txt +122 -122
  45. data/documentation/_build/html/_sources/tips_and_tricks/the_bakery.txt +72 -72
  46. data/documentation/_build/html/_sources/tips_and_tricks/the_clang.txt +43 -43
  47. data/documentation/_build/html/_sources/tips_and_tricks/tips_and_tricks.txt +34 -34
  48. data/documentation/_build/html/_sources/why_bake/why_bake.txt +40 -40
  49. data/documentation/_build/html/changelog.html +7 -0
  50. data/documentation/_build/html/commandline/commandline.html +2 -2
  51. data/documentation/_build/html/concepts/link_order.html +2 -2
  52. data/documentation/_build/html/concepts/prebuild.html +2 -2
  53. data/documentation/_build/html/index.html +4 -4
  54. data/documentation/_build/html/performance/performance.html +2 -2
  55. data/documentation/_build/html/searchindex.js +1 -1
  56. data/documentation/_build/html/syntax/adapt_configs.html +2 -2
  57. data/documentation/_build/html/syntax/syntax.html +2 -2
  58. data/documentation/_build/html/tips_and_tricks/the_clang.html +2 -2
  59. data/documentation/_build/html/why_bake/why_bake.html +2 -2
  60. data/lib/adapt/config/loader.rb +112 -112
  61. data/lib/bake/bundle.rb +158 -158
  62. data/lib/bake/cache.rb +179 -180
  63. data/lib/bake/config/checks.rb +68 -68
  64. data/lib/bake/config/loader.rb +363 -363
  65. data/lib/bake/libElement.rb +176 -176
  66. data/lib/bake/mergeConfig.rb +208 -208
  67. data/lib/bake/model/language.rb +45 -45
  68. data/lib/bake/model/loader.rb +99 -99
  69. data/lib/bake/model/metamodel.rb +307 -307
  70. data/lib/bake/model/metamodel_ext.rb +27 -27
  71. data/lib/bake/options/create.rb +95 -95
  72. data/lib/bake/options/options.rb +315 -310
  73. data/lib/bake/options/showDoc.rb +20 -20
  74. data/lib/bake/options/showLicense.rb +9 -9
  75. data/lib/bake/options/showToolchains.rb +38 -38
  76. data/lib/bake/options/usage.rb +79 -68
  77. data/lib/bake/subst.rb +313 -313
  78. data/lib/bake/toolchain/clang.rb +44 -44
  79. data/lib/bake/toolchain/clang_analyze.rb +31 -31
  80. data/lib/bake/toolchain/colorizing_formatter.rb +125 -125
  81. data/lib/bake/toolchain/diab.rb +53 -53
  82. data/lib/bake/toolchain/errorparser/diab_compiler_error_parser.rb +40 -40
  83. data/lib/bake/toolchain/errorparser/diab_linker_error_parser.rb +41 -41
  84. data/lib/bake/toolchain/errorparser/error_parser.rb +71 -71
  85. data/lib/bake/toolchain/errorparser/gcc_compiler_error_parser.rb +35 -35
  86. data/lib/bake/toolchain/errorparser/gcc_linker_error_parser.rb +35 -35
  87. data/lib/bake/toolchain/errorparser/greenhills_compiler_error_parser.rb +32 -32
  88. data/lib/bake/toolchain/errorparser/greenhills_linker_error_parser.rb +44 -44
  89. data/lib/bake/toolchain/errorparser/keil_compiler_error_parser.rb +40 -40
  90. data/lib/bake/toolchain/errorparser/keil_linker_error_parser.rb +30 -30
  91. data/lib/bake/toolchain/errorparser/lint_error_parser.rb +34 -34
  92. data/lib/bake/toolchain/errorparser/msvc_compiler_error_parser.rb +63 -63
  93. data/lib/bake/toolchain/errorparser/msvc_linker_error_parser.rb +42 -42
  94. data/lib/bake/toolchain/errorparser/process_output.rb +2 -2
  95. data/lib/bake/toolchain/errorparser/ti_compiler_error_parser.rb +30 -30
  96. data/lib/bake/toolchain/errorparser/ti_linker_error_parser.rb +30 -30
  97. data/lib/bake/toolchain/gcc.rb +49 -49
  98. data/lib/bake/toolchain/gcc_env.rb +55 -55
  99. data/lib/bake/toolchain/greenhills.rb +52 -52
  100. data/lib/bake/toolchain/keil.rb +53 -53
  101. data/lib/bake/toolchain/lint.rb +20 -20
  102. data/lib/bake/toolchain/msvc.rb +58 -58
  103. data/lib/bake/toolchain/provider.rb +146 -146
  104. data/lib/bake/toolchain/ti.rb +47 -47
  105. data/lib/bake/util.rb +149 -149
  106. data/lib/bakery/buildPattern.rb +24 -24
  107. data/lib/bakery/model/language.rb +22 -22
  108. data/lib/bakery/model/loader.rb +55 -55
  109. data/lib/bakery/model/metamodel.rb +48 -48
  110. data/lib/bakery/options/options.rb +87 -87
  111. data/lib/bakery/toBake.rb +81 -81
  112. data/lib/blocks/block.rb +324 -324
  113. data/lib/blocks/blockBase.rb +204 -204
  114. data/lib/blocks/commandLine.rb +38 -38
  115. data/lib/blocks/compile.rb +529 -528
  116. data/lib/blocks/convert.rb +41 -41
  117. data/lib/blocks/docu.rb +30 -30
  118. data/lib/blocks/executable.rb +174 -174
  119. data/lib/blocks/has_execute_command.rb +31 -31
  120. data/lib/blocks/library.rb +114 -114
  121. data/lib/blocks/lint.rb +56 -56
  122. data/lib/blocks/makefile.rb +100 -100
  123. data/lib/blocks/showIncludes.rb +140 -125
  124. data/lib/common/abortException.rb +4 -4
  125. data/lib/common/cleanup.rb +10 -10
  126. data/lib/common/exit_helper.rb +38 -38
  127. data/lib/common/ext/file.rb +88 -88
  128. data/lib/common/ext/rtext.rb +11 -11
  129. data/lib/common/ext/stdout.rb +45 -45
  130. data/lib/common/ide_interface.rb +194 -194
  131. data/lib/common/options/parser.rb +95 -85
  132. data/lib/common/process.rb +64 -64
  133. data/lib/common/utils.rb +52 -52
  134. data/lib/common/version.rb +31 -23
  135. data/lib/multithread/job.rb +44 -44
  136. data/lib/tocxx.rb +558 -555
  137. data/lib/vs/options.rb +69 -69
  138. data/license.txt +90 -90
  139. 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