mirror of
https://github.com/ThrowTheSwitch/CMock.git
synced 2026-06-05 21:15:20 +00:00
Merge pull request #258 from jlindgren90/master
Fix compile error when :unity_helper_path is relative.
This commit is contained in:
+10
-1
@@ -65,7 +65,16 @@ class CMockConfig
|
||||
end
|
||||
options[:unity_helper_path] ||= options[:unity_helper]
|
||||
options[:unity_helper_path] = [options[:unity_helper_path]] if options[:unity_helper_path].is_a? String
|
||||
options[:includes_c_post_header] = ((options[:includes_c_post_header] || []) + (options[:unity_helper_path] || [])).uniq
|
||||
|
||||
if options[:unity_helper_path]
|
||||
require 'pathname'
|
||||
includes1 = options[:includes_c_post_header] || []
|
||||
includes2 = options[:unity_helper_path].map do |path|
|
||||
Pathname(path).relative_path_from(Pathname(options[:mock_path])).to_s
|
||||
end
|
||||
options[:includes_c_post_header] = (includes1 + includes2).uniq
|
||||
end
|
||||
|
||||
options[:plugins].compact!
|
||||
options[:plugins].map! {|p| p.to_sym}
|
||||
@options = options
|
||||
|
||||
Reference in New Issue
Block a user