docs/CMake.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Module: CMake
— Documentation by YARD 0.9.19
</title>
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
<script type="text/javascript" charset="utf-8">
pathId = "CMake";
relpath = '';
</script>
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="_index.html">Index (C)</a> »
<span class="title">CMake</span>
</div>
<div id="search">
<a class="full_list_link" id="class_list_link"
href="class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Module: CMake
</h1>
<div class="box_info">
<dl>
<dt>Includes:</dt>
<dd><span class='object_link'><a href="Runners.html" title="Runners (module)">Runners</a></span></dd>
</dl>
<dl>
<dt>Included in:</dt>
<dd><span class='object_link'><a href="PotentialBuild.html" title="PotentialBuild (class)">PotentialBuild</a></span></dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>lib/cmake.rb</dd>
</dl>
</div>
<h2>Overview</h2><div class="docstring">
<div class="discussion">
<p>contains functions necessary for working with the 'cmake' engine</p>
</div>
</div>
<div class="tags">
</div>
<h2>
Instance Method Summary
<small><a href="#" class="summary_toggle">collapse</a></small>
</h2>
<ul class="summary">
<li class="public ">
<span class="summary_signature">
<a href="#cmake_build-instance_method" title="#cmake_build (instance method)">#<strong>cmake_build</strong>(compiler, src_dir, build_dir, regression_dir, regression_baseline, cmake_build_args) ⇒ Object </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#cmake_remove_git_from_path-instance_method" title="#cmake_remove_git_from_path (instance method)">#<strong>cmake_remove_git_from_path</strong>(old_path) ⇒ Object </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#cmake_test-instance_method" title="#cmake_test (instance method)">#<strong>cmake_test</strong>(compiler, src_dir, build_dir, build_type) ⇒ Object </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
</ul>
<h3 class="inherited">Methods included from <span class='object_link'><a href="Runners.html" title="Runners (module)">Runners</a></span></h3>
<p class="inherited"><span class='object_link'><a href="Runners.html#monitor_thread_state-instance_method" title="Runners#monitor_thread_state (method)">#monitor_thread_state</a></span>, <span class='object_link'><a href="Runners.html#read_state_singular-instance_method" title="Runners#read_state_singular (method)">#read_state_singular</a></span>, <span class='object_link'><a href="Runners.html#run_scripts-instance_method" title="Runners#run_scripts (method)">#run_scripts</a></span>, <span class='object_link'><a href="Runners.html#run_single_script-instance_method" title="Runners#run_single_script (method)">#run_single_script</a></span>, <span class='object_link'><a href="Runners.html#run_with_timeout-instance_method" title="Runners#run_with_timeout (method)">#run_with_timeout</a></span></p>
<div id="instance_method_details" class="method_details_list">
<h2>Instance Method Details</h2>
<div class="method_details first">
<h3 class="signature first" id="cmake_build-instance_method">
#<strong>cmake_build</strong>(compiler, src_dir, build_dir, regression_dir, regression_baseline, cmake_build_args) ⇒ <tt>Object</tt>
</h3><table class="source_code">
<tr>
<td>
<pre class="lines">
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/cmake.rb', line 20</span>
<span class='kw'>def</span> <span class='id identifier rubyid_cmake_build'>cmake_build</span><span class='lparen'>(</span><span class='id identifier rubyid_compiler'>compiler</span><span class='comma'>,</span> <span class='id identifier rubyid_src_dir'>src_dir</span><span class='comma'>,</span> <span class='id identifier rubyid_build_dir'>build_dir</span><span class='comma'>,</span> <span class='id identifier rubyid_regression_dir'>regression_dir</span><span class='comma'>,</span> <span class='id identifier rubyid_regression_baseline'>regression_baseline</span><span class='comma'>,</span> <span class='id identifier rubyid_cmake_build_args'>cmake_build_args</span><span class='rparen'>)</span>
<span class='const'>FileUtils</span><span class='period'>.</span><span class='id identifier rubyid_mkdir_p'>mkdir_p</span> <span class='id identifier rubyid_build_dir'>build_dir</span>
<span class='id identifier rubyid_cmake_flags'>cmake_flags</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_compiler'>compiler</span><span class='lbracket'>[</span><span class='symbol'>:cmake_extra_flags</span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_content'> -DDEVICE_ID:STRING=\"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_cmake_build_args'>cmake_build_args</span><span class='period'>.</span><span class='id identifier rubyid_this_device_id'>this_device_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>\"</span><span class='tstring_end'>"</span></span>
<span class='id identifier rubyid_compiler_extra_flags'>compiler_extra_flags</span> <span class='op'>=</span> <span class='id identifier rubyid_compiler'>compiler</span><span class='lbracket'>[</span><span class='symbol'>:compiler_extra_flags</span><span class='rbracket'>]</span>
<span class='id identifier rubyid_compiler_extra_flags'>compiler_extra_flags</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_compiler_extra_flags'>compiler_extra_flags</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
<span class='kw'>if</span> <span class='id identifier rubyid_cmake_build_args'>cmake_build_args</span><span class='period'>.</span><span class='id identifier rubyid_is_release'>is_release</span>
<span class='id identifier rubyid_extra_flags'>extra_flags</span> <span class='op'>=</span> <span class='id identifier rubyid_compiler'>compiler</span><span class='lbracket'>[</span><span class='symbol'>:release_build_cmake_extra_flags</span><span class='rbracket'>]</span>
<span class='id identifier rubyid_cmake_flags'>cmake_flags</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_cmake_flags'>cmake_flags</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_extra_flags'>extra_flags</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='kw'>unless</span> <span class='id identifier rubyid_extra_flags'>extra_flags</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
<span class='kw'>end</span>
<span class='kw'>if</span> <span class='id identifier rubyid_compiler'>compiler</span><span class='lbracket'>[</span><span class='symbol'>:cc_bin</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
<span class='id identifier rubyid_env'>env</span> <span class='op'>=</span> <span class='lbrace'>{</span>
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>CXXFLAGS</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/FC </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_compiler_extra_flags'>compiler_extra_flags</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='comma'>,</span>
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>CFLAGS</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/FC </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_compiler_extra_flags'>compiler_extra_flags</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='comma'>,</span>
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>CCACHE_BASEDIR</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='id identifier rubyid_build_dir'>build_dir</span><span class='comma'>,</span>
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>CCACHE_UNIFY</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>true</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>CCACHE_SLOPPINESS</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>include_file_mtime</span><span class='tstring_end'>'</span></span>
<span class='rbrace'>}</span>
<span class='kw'>else</span>
<span class='id identifier rubyid_cmake_flags'>cmake_flags</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>-DCMAKE_C_COMPILER:PATH=\"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_compiler'>compiler</span><span class='lbracket'>[</span><span class='symbol'>:cc_bin</span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_content'>\" -DCMAKE_CXX_COMPILER:PATH=\"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_compiler'>compiler</span><span class='lbracket'>[</span><span class='symbol'>:cxx_bin</span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_content'>\" </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_cmake_flags'>cmake_flags</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
<span class='id identifier rubyid_env'>env</span> <span class='op'>=</span> <span class='lbrace'>{</span>
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>CXXFLAGS</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='id identifier rubyid_compiler_extra_flags'>compiler_extra_flags</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='comma'>,</span>
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>CFLAGS</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='id identifier rubyid_compiler_extra_flags'>compiler_extra_flags</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='comma'>,</span>
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>CCACHE_BASEDIR</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='id identifier rubyid_build_dir'>build_dir</span><span class='comma'>,</span>
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>CCACHE_UNIFY</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>true</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>CCACHE_SLOPPINESS</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>include_file_mtime</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>CC</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='id identifier rubyid_compiler'>compiler</span><span class='lbracket'>[</span><span class='symbol'>:cc_bin</span><span class='rbracket'>]</span><span class='comma'>,</span>
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>CXX</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='id identifier rubyid_compiler'>compiler</span><span class='lbracket'>[</span><span class='symbol'>:cxx_bin</span><span class='rbracket'>]</span>
<span class='rbrace'>}</span>
<span class='kw'>end</span>
<span class='id identifier rubyid_env'>env</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>PATH</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_cmake_remove_git_from_path'>cmake_remove_git_from_path</span><span class='lparen'>(</span><span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>PATH</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='rparen'>)</span>
<span class='kw'>if</span> <span class='id identifier rubyid_regression_baseline'>regression_baseline</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
<span class='id identifier rubyid_env'>env</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>REGRESSION_BASELINE</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'> </span><span class='tstring_end'>'</span></span>
<span class='id identifier rubyid_env'>env</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>REGRESSION_DIR</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'> </span><span class='tstring_end'>'</span></span>
<span class='id identifier rubyid_env'>env</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>REGRESSION_BASELINE_SHA</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'> </span><span class='tstring_end'>'</span></span>
<span class='id identifier rubyid_env'>env</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>COMMIT_SHA</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'> </span><span class='tstring_end'>'</span></span>
<span class='kw'>else</span>
<span class='id identifier rubyid_env'>env</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>REGRESSION_BASELINE</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span><span class='lparen'>(</span><span class='id identifier rubyid_regression_baseline'>regression_baseline</span><span class='period'>.</span><span class='id identifier rubyid_this_build_dir'>this_build_dir</span><span class='rparen'>)</span>
<span class='id identifier rubyid_env'>env</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>REGRESSION_DIR</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span><span class='lparen'>(</span><span class='id identifier rubyid_regression_dir'>regression_dir</span><span class='rparen'>)</span>
<span class='id identifier rubyid_env'>env</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>REGRESSION_BASELINE_SHA</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_regression_baseline'>regression_baseline</span><span class='period'>.</span><span class='id identifier rubyid_commit_sha'>commit_sha</span>
<span class='id identifier rubyid_env'>env</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>COMMIT_SHA</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='ivar'>@commit_sha</span> <span class='op'>&&</span> <span class='ivar'>@commit_sha</span> <span class='op'>!=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span> <span class='op'>?</span> <span class='ivar'>@commit_sha</span> <span class='op'>:</span> <span class='ivar'>@tag_name</span>
<span class='kw'>end</span>
<span class='id identifier rubyid_env'>env</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>GITHUB_TOKEN</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>GITHUB_TOKEN</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
<span class='kw'>if</span> <span class='id identifier rubyid_compiler'>compiler</span><span class='lbracket'>[</span><span class='symbol'>:name</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Visual Studio</span><span class='tstring_end'>'</span></span> <span class='comment'># :nocov: Not testing windows right now
</span>
<span class='id identifier rubyid__'>_</span><span class='comma'>,</span> <span class='id identifier rubyid_err'>err</span><span class='comma'>,</span> <span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='id identifier rubyid_run_scripts'>run_scripts</span><span class='lparen'>(</span>
<span class='ivar'>@config</span><span class='comma'>,</span>
<span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>cd </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_build_dir'>build_dir</span><span class='embexpr_end'>}</span><span class='tstring_content'> && </span><span class='embexpr_beg'>#{</span><span class='ivar'>@config</span><span class='period'>.</span><span class='id identifier rubyid_cmake_bin'>cmake_bin</span><span class='embexpr_end'>}</span><span class='tstring_content'> ../ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_cmake_flags'>cmake_flags</span><span class='embexpr_end'>}</span><span class='tstring_content'> -DCMAKE_BUILD_TYPE:STRING=</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_cmake_build_args'>cmake_build_args</span><span class='period'>.</span><span class='id identifier rubyid_build_type'>build_type</span><span class='embexpr_end'>}</span><span class='tstring_content'> -G \"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_compiler'>compiler</span><span class='lbracket'>[</span><span class='symbol'>:build_generator</span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_content'>\" -A </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_compiler'>compiler</span><span class='lbracket'>[</span><span class='symbol'>:target_arch</span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_env'>env</span>
<span class='rparen'>)</span> <span class='comment'># :nocov:
</span>
<span class='kw'>else</span>
<span class='id identifier rubyid__'>_</span><span class='comma'>,</span> <span class='id identifier rubyid_err'>err</span><span class='comma'>,</span> <span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='id identifier rubyid_run_scripts'>run_scripts</span><span class='lparen'>(</span>
<span class='ivar'>@config</span><span class='comma'>,</span>
<span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>cd </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_build_dir'>build_dir</span><span class='embexpr_end'>}</span><span class='tstring_content'> && </span><span class='embexpr_beg'>#{</span><span class='ivar'>@config</span><span class='period'>.</span><span class='id identifier rubyid_cmake_bin'>cmake_bin</span><span class='embexpr_end'>}</span><span class='tstring_content'> ../ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_cmake_flags'>cmake_flags</span><span class='embexpr_end'>}</span><span class='tstring_content'> -DCMAKE_BUILD_TYPE:STRING=</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_cmake_build_args'>cmake_build_args</span><span class='period'>.</span><span class='id identifier rubyid_build_type'>build_type</span><span class='embexpr_end'>}</span><span class='tstring_content'> -G \"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_compiler'>compiler</span><span class='lbracket'>[</span><span class='symbol'>:build_generator</span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_content'>\"</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_env'>env</span>
<span class='rparen'>)</span>
<span class='kw'>end</span>
<span class='id identifier rubyid_cmake_result'>cmake_result</span> <span class='op'>=</span> <span class='id identifier rubyid_process_cmake_results'>process_cmake_results</span><span class='lparen'>(</span><span class='id identifier rubyid_src_dir'>src_dir</span><span class='comma'>,</span> <span class='id identifier rubyid_build_dir'>build_dir</span><span class='comma'>,</span> <span class='id identifier rubyid_err'>err</span><span class='comma'>,</span> <span class='id identifier rubyid_result'>result</span><span class='comma'>,</span> <span class='kw'>false</span><span class='rparen'>)</span>
<span class='kw'>return</span> <span class='kw'>false</span> <span class='kw'>unless</span> <span class='id identifier rubyid_cmake_result'>cmake_result</span>
<span class='gvar'>$logger</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Configure step completed, beginning build step</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
<span class='id identifier rubyid_build_switches'>build_switches</span> <span class='op'>=</span> <span class='kw'>if</span> <span class='ivar'>@config</span><span class='period'>.</span><span class='id identifier rubyid_os'>os</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Windows</span><span class='tstring_end'>'</span></span>
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span>
<span class='kw'>else</span>
<span class='comment'># :nocov: Not covering windows
</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>-j</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_compiler'>compiler</span><span class='lbracket'>[</span><span class='symbol'>:num_parallel_builds</span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='comment'># :nocov:
</span>
<span class='kw'>end</span>
<span class='id identifier rubyid_out'>out</span><span class='comma'>,</span> <span class='id identifier rubyid_err'>err</span><span class='comma'>,</span> <span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='id identifier rubyid_run_scripts'>run_scripts</span><span class='lparen'>(</span>
<span class='ivar'>@config</span><span class='comma'>,</span>
<span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>cd </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_build_dir'>build_dir</span><span class='embexpr_end'>}</span><span class='tstring_content'> && </span><span class='embexpr_beg'>#{</span><span class='ivar'>@config</span><span class='period'>.</span><span class='id identifier rubyid_cmake_bin'>cmake_bin</span><span class='embexpr_end'>}</span><span class='tstring_content'> --build . --config </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_cmake_build_args'>cmake_build_args</span><span class='period'>.</span><span class='id identifier rubyid_build_type'>build_type</span><span class='embexpr_end'>}</span><span class='tstring_content'> --use-stderr -- </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_build_switches'>build_switches</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_env'>env</span>
<span class='rparen'>)</span>
<span class='id identifier rubyid_msvc_success'>msvc_success</span> <span class='op'>=</span> <span class='id identifier rubyid_process_msvc_results'>process_msvc_results</span><span class='lparen'>(</span><span class='id identifier rubyid_src_dir'>src_dir</span><span class='comma'>,</span> <span class='id identifier rubyid_build_dir'>build_dir</span><span class='comma'>,</span> <span class='id identifier rubyid_out'>out</span><span class='comma'>,</span> <span class='id identifier rubyid_result'>result</span><span class='rparen'>)</span>
<span class='id identifier rubyid_gcc_success'>gcc_success</span> <span class='op'>=</span> <span class='id identifier rubyid_process_gcc_results'>process_gcc_results</span><span class='lparen'>(</span><span class='id identifier rubyid_src_dir'>src_dir</span><span class='comma'>,</span> <span class='id identifier rubyid_build_dir'>build_dir</span><span class='comma'>,</span> <span class='id identifier rubyid_err'>err</span><span class='comma'>,</span> <span class='id identifier rubyid_result'>result</span><span class='rparen'>)</span>
<span class='id identifier rubyid_process_cmake_results'>process_cmake_results</span><span class='lparen'>(</span><span class='id identifier rubyid_src_dir'>src_dir</span><span class='comma'>,</span> <span class='id identifier rubyid_build_dir'>build_dir</span><span class='comma'>,</span> <span class='id identifier rubyid_err'>err</span><span class='comma'>,</span> <span class='id identifier rubyid_result'>result</span><span class='comma'>,</span> <span class='kw'>false</span><span class='rparen'>)</span>
<span class='id identifier rubyid_process_python_results'>process_python_results</span><span class='lparen'>(</span><span class='id identifier rubyid_src_dir'>src_dir</span><span class='comma'>,</span> <span class='id identifier rubyid_build_dir'>build_dir</span><span class='comma'>,</span> <span class='id identifier rubyid_out'>out</span><span class='comma'>,</span> <span class='id identifier rubyid_err'>err</span><span class='comma'>,</span> <span class='id identifier rubyid_result'>result</span><span class='rparen'>)</span>
<span class='id identifier rubyid_msvc_success'>msvc_success</span> <span class='op'>&&</span> <span class='id identifier rubyid_gcc_success'>gcc_success</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="cmake_remove_git_from_path-instance_method">
#<strong>cmake_remove_git_from_path</strong>(old_path) ⇒ <tt>Object</tt>
</h3><table class="source_code">
<tr>
<td>
<pre class="lines">
110
111
112
113
114
115
116
117
118
119
120
121
122</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/cmake.rb', line 110</span>
<span class='kw'>def</span> <span class='id identifier rubyid_cmake_remove_git_from_path'>cmake_remove_git_from_path</span><span class='lparen'>(</span><span class='id identifier rubyid_old_path'>old_path</span><span class='rparen'>)</span>
<span class='comment'># The point is to remove the git provided sh.exe from the path so that it does
</span> <span class='comment'># not conflict with other operations
</span> <span class='kw'>if</span> <span class='ivar'>@config</span><span class='period'>.</span><span class='id identifier rubyid_os'>os</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Windows</span><span class='tstring_end'>'</span></span> <span class='comment'># :nocov: Not covering Windows
</span>
<span class='id identifier rubyid_paths'>paths</span> <span class='op'>=</span> <span class='id identifier rubyid_old_path'>old_path</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>;</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
<span class='id identifier rubyid_paths'>paths</span><span class='period'>.</span><span class='id identifier rubyid_delete_if'>delete_if</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_p'>p</span><span class='op'>|</span> <span class='id identifier rubyid_p'>p</span> <span class='op'>=~</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>Git</span><span class='regexp_end'>/</span></span> <span class='rbrace'>}</span>
<span class='kw'>return</span> <span class='id identifier rubyid_paths'>paths</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>;</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span> <span class='comment'># :nocov:
</span>
<span class='kw'>end</span>
<span class='id identifier rubyid_old_path'>old_path</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="cmake_test-instance_method">
#<strong>cmake_test</strong>(compiler, src_dir, build_dir, build_type) ⇒ <tt>Object</tt>
</h3><table class="source_code">
<tr>
<td>
<pre class="lines">
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/cmake.rb', line 124</span>
<span class='kw'>def</span> <span class='id identifier rubyid_cmake_test'>cmake_test</span><span class='lparen'>(</span><span class='id identifier rubyid_compiler'>compiler</span><span class='comma'>,</span> <span class='id identifier rubyid_src_dir'>src_dir</span><span class='comma'>,</span> <span class='id identifier rubyid_build_dir'>build_dir</span><span class='comma'>,</span> <span class='id identifier rubyid_build_type'>build_type</span><span class='rparen'>)</span>
<span class='id identifier rubyid_test_dirs'>test_dirs</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='comment'># always start with the root build directory
</span>
<span class='id identifier rubyid_ctest_filter'>ctest_filter</span> <span class='op'>=</span> <span class='id identifier rubyid_compiler'>compiler</span><span class='lbracket'>[</span><span class='symbol'>:ctest_filter</span><span class='rbracket'>]</span>
<span class='id identifier rubyid_ctest_filter'>ctest_filter</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_ctest_filter'>ctest_filter</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
<span class='id identifier rubyid_test_dirs'>test_dirs</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_test_dir'>test_dir</span><span class='op'>|</span>
<span class='gvar'>$logger</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Running tests in dir: '</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_build_dir'>build_dir</span><span class='embexpr_end'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_test_dir'>test_dir</span><span class='embexpr_end'>}</span><span class='tstring_content'>'</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
<span class='id identifier rubyid_env'>env</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>PATH</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='id identifier rubyid_cmake_remove_git_from_path'>cmake_remove_git_from_path</span><span class='lparen'>(</span><span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>PATH</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
<span class='id identifier rubyid__'>_</span><span class='comma'>,</span> <span class='id identifier rubyid_test_stderr'>test_stderr</span><span class='comma'>,</span> <span class='id identifier rubyid_test_result'>test_result</span> <span class='op'>=</span> <span class='id identifier rubyid_run_scripts'>run_scripts</span><span class='lparen'>(</span>
<span class='ivar'>@config</span><span class='comma'>,</span>
<span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>cd </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_build_dir'>build_dir</span><span class='embexpr_end'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_test_dir'>test_dir</span><span class='embexpr_end'>}</span><span class='tstring_content'> && </span><span class='embexpr_beg'>#{</span><span class='ivar'>@config</span><span class='period'>.</span><span class='id identifier rubyid_ctest_bin'>ctest_bin</span><span class='embexpr_end'>}</span><span class='tstring_content'> -j </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_compiler'>compiler</span><span class='lbracket'>[</span><span class='symbol'>:num_parallel_builds</span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_content'> --timeout 4800 --no-compress-output -D ExperimentalTest -C </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_build_type'>build_type</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_ctest_filter'>ctest_filter</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
<span class='id identifier rubyid_env'>env</span>
<span class='rparen'>)</span>
<span class='id identifier rubyid_test_results'>test_results</span><span class='comma'>,</span> <span class='id identifier rubyid_test_messages'>test_messages</span> <span class='op'>=</span> <span class='id identifier rubyid_process_ctest_results'>process_ctest_results</span> <span class='id identifier rubyid_src_dir'>src_dir</span><span class='comma'>,</span> <span class='id identifier rubyid_build_dir'>build_dir</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_build_dir'>build_dir</span><span class='embexpr_end'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_test_dir'>test_dir</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
<span class='kw'>if</span> <span class='ivar'>@test_results</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
<span class='ivar'>@test_results</span> <span class='op'>=</span> <span class='id identifier rubyid_test_results'>test_results</span>
<span class='kw'>else</span>
<span class='ivar'>@test_results</span><span class='period'>.</span><span class='id identifier rubyid_concat'>concat</span><span class='lparen'>(</span><span class='id identifier rubyid_test_results'>test_results</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_test_results'>test_results</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
<span class='kw'>end</span>
<span class='ivar'>@test_messages</span><span class='period'>.</span><span class='id identifier rubyid_concat'>concat</span><span class='lparen'>(</span><span class='id identifier rubyid_test_messages'>test_messages</span><span class='rparen'>)</span>
<span class='comment'># may as well see if there are some cmake results to pick up here
</span> <span class='id identifier rubyid_process_cmake_results'>process_cmake_results</span><span class='lparen'>(</span><span class='id identifier rubyid_src_dir'>src_dir</span><span class='comma'>,</span> <span class='id identifier rubyid_build_dir'>build_dir</span><span class='comma'>,</span> <span class='id identifier rubyid_test_stderr'>test_stderr</span><span class='comma'>,</span> <span class='id identifier rubyid_test_result'>test_result</span><span class='comma'>,</span> <span class='kw'>false</span><span class='rparen'>)</span>
<span class='kw'>end</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
</div>
</div>
<div id="footer">
Generated on Thu May 18 10:34:59 2023 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.19 (ruby-2.7.0).
</div>
</div>
</body>
</html>