Skip to content

Commit 5772fd4

Browse files
author
mantid-builder
committed
Automatic update of developer site
1 parent d74a680 commit 5772fd4

File tree

3 files changed

+38
-13
lines changed

3 files changed

+38
-13
lines changed

CLion.html

Lines changed: 36 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,13 @@ <h3>Navigation</h3>
105105
<ul class="simple">
106106
<li><p><a class="reference internal" href="#installing-clion" id="id1">Installing CLion</a></p></li>
107107
<li><p><a class="reference internal" href="#opening-clion" id="id2">Opening CLion</a></p></li>
108-
<li><p><a class="reference internal" href="#setup-for-a-clion-build" id="id3">Setup for a CLion Build</a></p></li>
109-
<li><p><a class="reference internal" href="#building-with-clion" id="id4">Building with CLion</a></p></li>
110-
<li><p><a class="reference internal" href="#debugging-with-clion" id="id5">Debugging with CLion</a></p></li>
108+
<li><p><a class="reference internal" href="#setup-for-a-clion-build" id="id3">Setup for a CLion Build</a></p>
109+
<ul>
110+
<li><p><a class="reference internal" href="#additional-build-configuration" id="id4">Additional Build Configuration</a></p></li>
111+
</ul>
112+
</li>
113+
<li><p><a class="reference internal" href="#building-with-clion" id="id5">Building with CLion</a></p></li>
114+
<li><p><a class="reference internal" href="#debugging-with-clion" id="id6">Debugging with CLion</a></p></li>
111115
</ul>
112116
</nav>
113117
<section id="installing-clion">
@@ -188,9 +192,20 @@ <h2><a class="toc-backref" href="#id3" role="doc-backlink">Setup for a CLion Bui
188192
<li><p>Set the build directory to the <code class="docutils literal notranslate"><span class="pre">build</span></code> directory if it is not the default (you’ll need to use the full path if its outside the source directory)</p></li>
189193
<li><p>The configurations drop-down at the top should show all of the build targets. If not, the CMake project is probably not loaded. Go to <code class="docutils literal notranslate"><span class="pre">File</span> <span class="pre">&gt;</span> <span class="pre">Reload</span> <span class="pre">CMake</span> <span class="pre">Project</span></code>. The configurations should be populated</p></li>
190194
</ol>
195+
<section id="additional-build-configuration">
196+
<h3><a class="toc-backref" href="#id4" role="doc-backlink">Additional Build Configuration</a><a class="headerlink" href="#additional-build-configuration" title="Link to this heading"></a></h3>
197+
<p>This (optional) additional configuration allows one to start Clion from the JetBrains Toolbox or
198+
from a terminal without having to activate the conda environment in the terminal.
199+
This is useful when you’re working on both Mantid and other projects in CLion simultaneously.</p>
200+
<ol class="arabic simple">
201+
<li><p>Navigate to <code class="docutils literal notranslate"><span class="pre">File</span> <span class="pre">&gt;</span> <span class="pre">Settings</span> <span class="pre">&gt;</span> <span class="pre">Build,</span> <span class="pre">Execution,</span> <span class="pre">Deployment</span> <span class="pre">&gt;</span> <span class="pre">CMake</span></code></p></li>
202+
<li><p>Under <code class="docutils literal notranslate"><span class="pre">environment</span></code>, add new environment variable <code class="docutils literal notranslate"><span class="pre">CONDA_PREFIX</span></code> with value <code class="docutils literal notranslate"><span class="pre">/path/to/mambaforge/envs/mantid-developer</span></code>.</p></li>
203+
<li><p>Navigate to <code class="docutils literal notranslate"><span class="pre">File</span> <span class="pre">&gt;</span> <span class="pre">Settings</span> <span class="pre">&gt;</span> <span class="pre">Build,</span> <span class="pre">Execution,</span> <span class="pre">Deployment</span> <span class="pre">&gt;</span> <span class="pre">Python</span> <span class="pre">Interpreter</span> <span class="pre">&gt;</span> <span class="pre">Add</span> <span class="pre">Interpreter</span> <span class="pre">&gt;</span> <span class="pre">Add</span> <span class="pre">Local</span> <span class="pre">Interpreter</span> <span class="pre">&gt;</span> <span class="pre">Conda</span> <span class="pre">Environment</span> <span class="pre">&gt;</span> <span class="pre">Use</span> <span class="pre">existing</span> <span class="pre">environment</span></code>, then select <code class="docutils literal notranslate"><span class="pre">mantid-developer</span></code>.</p></li>
204+
</ol>
205+
</section>
191206
</section>
192207
<section id="building-with-clion">
193-
<h2><a class="toc-backref" href="#id4" role="doc-backlink">Building with CLion</a><a class="headerlink" href="#building-with-clion" title="Link to this heading"></a></h2>
208+
<h2><a class="toc-backref" href="#id5" role="doc-backlink">Building with CLion</a><a class="headerlink" href="#building-with-clion" title="Link to this heading"></a></h2>
194209
<ul class="simple">
195210
<li><p>To build all targets, navigate to <code class="docutils literal notranslate"><span class="pre">Build</span> <span class="pre">&gt;</span> <span class="pre">Build</span> <span class="pre">All</span> <span class="pre">in</span> <span class="pre">'Debug'</span></code>. Check that the build command displayed in the Messages window is running the correct cmake executable from your conda installation.</p></li>
196211
<li><p>To build a specific target, select it in the configurations drop-down menu and click the hammer icon next to it.</p></li>
@@ -210,24 +225,34 @@ <h2><a class="toc-backref" href="#id4" role="doc-backlink">Building with CLion</
210225
</ol>
211226
</section>
212227
<section id="debugging-with-clion">
213-
<h2><a class="toc-backref" href="#id5" role="doc-backlink">Debugging with CLion</a><a class="headerlink" href="#debugging-with-clion" title="Link to this heading"></a></h2>
228+
<h2><a class="toc-backref" href="#id6" role="doc-backlink">Debugging with CLion</a><a class="headerlink" href="#debugging-with-clion" title="Link to this heading"></a></h2>
214229
<p>To debug workbench, you’ll need to edit the <code class="docutils literal notranslate"><span class="pre">workbench</span></code> CMake Application configuration.</p>
215230
<ol class="arabic">
216-
<li><p>Set the executable to be the <code class="docutils literal notranslate"><span class="pre">python.exe</span></code> in your conda installation</p>
231+
<li><p>Set the executable to be the <code class="docutils literal notranslate"><span class="pre">python</span></code> executable in your conda installation:</p>
217232
<table class="hlist"><tr><td><ul class="simple">
218-
<li><p>On Linux: <code class="docutils literal notranslate"><span class="pre">/path/to/mambaforge/envs/mantid-developer/bin/python.exe</span></code></p></li>
233+
<li><p>On Linux &amp; macOS: <code class="docutils literal notranslate"><span class="pre">/path/to/mambaforge/envs/mantid-developer/bin/python</span></code></p></li>
219234
<li><p>On Windows: <code class="docutils literal notranslate"><span class="pre">/path/to/mambaforge/envs/mantid-developer/python.exe</span></code></p></li>
220235
</ul>
221236
</td></tr></table>
222237
</li>
223-
<li><p>Set the program arguments</p>
238+
<li><p>Set the program arguments:</p>
239+
<table class="hlist"><tr><td><ul class="simple">
240+
<li><p>On Linux, macOS and Windows: <code class="docutils literal notranslate"><span class="pre">-m</span> <span class="pre">workbench</span> <span class="pre">--single-process</span></code></p></li>
241+
</ul>
242+
</td></tr></table>
243+
</li>
244+
<li><p>Set the working directory:</p>
245+
<table class="hlist"><tr><td><ul class="simple">
246+
<li><p>All OS: <code class="docutils literal notranslate"><span class="pre">path/to/mambaforge/envs/md/bin/</span></code></p></li>
247+
</ul>
248+
</td></tr></table>
249+
</li>
250+
<li><p>Set any relevant environment variables:</p>
224251
<table class="hlist"><tr><td><ul class="simple">
225-
<li><p>On Linux: <code class="docutils literal notranslate"><span class="pre">workbench</span> <span class="pre">--single-process</span></code></p></li>
226-
<li><p>On Windows: <code class="docutils literal notranslate"><span class="pre">workbench-script.pyw</span> <span class="pre">--single-process</span></code></p></li>
252+
<li><p>On macOS: <code class="docutils literal notranslate"><span class="pre">PYTHONPATH=${PYTHONPATH}:/full/path/to/build/bin/</span></code></p></li>
227253
</ul>
228254
</td></tr></table>
229255
</li>
230-
<li><p>Set the working directory to be the full path to your <code class="docutils literal notranslate"><span class="pre">build/bin</span></code> directory</p></li>
231256
</ol>
232257
<p>The <code class="docutils literal notranslate"><span class="pre">--single-process</span></code> flag is necessary for debugging. See the <a class="reference internal" href="Workbench/RunningWorkbench.html#runningworkbench"><span class="std std-ref">Running Workbench</span></a> documentation for more information.</p>
233258
<p>You should now be able to set breakpoints and start debugging by clicking the bug icon.</p>

PyCharm.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ <h2><a class="toc-backref" href="#id2" role="doc-backlink">Setup Python developm
162162
<li><p>Click the <code class="docutils literal notranslate"><span class="pre">+</span></code> icon top left</p></li>
163163
<li><p>Select Python</p></li>
164164
<li><p>Name it something to do with <code class="docutils literal notranslate"><span class="pre">Workbench</span></code></p></li>
165-
<li><p>In the <code class="docutils literal notranslate"><span class="pre">Script</span> <span class="pre">Path:</span></code> box, on Linux/MacOS enter the <code class="docutils literal notranslate"><span class="pre">{BUILD}/bin/workbench</span></code> Python script, on Windows enter <code class="docutils literal notranslate"><span class="pre">{BUILD}/bin/DebugWithRelRuntime/workbench-script.pyw</span></code>, <code class="docutils literal notranslate"><span class="pre">.pyw</span></code> files will not appear in the search window as it only shows <code class="docutils literal notranslate"><span class="pre">.py</span></code> files, so you cannot search for it with the GUI.</p></li>
165+
<li><p>Click the down arrow next to <code class="docutils literal notranslate"><span class="pre">Script</span> <span class="pre">path:</span></code> and change the selection to <code class="docutils literal notranslate"><span class="pre">Module</span> <span class="pre">name</span></code>. Set the <code class="docutils literal notranslate"><span class="pre">Module</span> <span class="pre">name</span></code> to <code class="docutils literal notranslate"><span class="pre">workbench</span></code>.</p></li>
166166
<li><p>In the <code class="docutils literal notranslate"><span class="pre">Parameters</span></code> box add <code class="docutils literal notranslate"><span class="pre">--single-process</span></code> so that the multiprocess startup is disabled and breakpoints can be attached to the primary process. See the <a class="reference internal" href="Workbench/RunningWorkbench.html#runningworkbench"><span class="std std-ref">Running Workbench</span></a> documentation for more information.</p></li>
167167
<li><p>In the <code class="docutils literal notranslate"><span class="pre">Working</span> <span class="pre">directory:</span></code> box, on Linux/MacOS enter the <code class="docutils literal notranslate"><span class="pre">{BUILD}/bin</span></code> directory, on Windows enter <code class="docutils literal notranslate"><span class="pre">{BUILD}/bin/DebugWithRelRuntime</span></code> directory.</p></li>
168168
<li><p>Ensure the <code class="docutils literal notranslate"><span class="pre">Python</span> <span class="pre">Interpreter:</span></code> box is set to use your <code class="docutils literal notranslate"><span class="pre">(mantid-developer)</span></code> Conda environment.</p></li>

searchindex.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)