Skip to content

Commit

Permalink
Update nest_with_ides.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
JanVogelsang authored Dec 13, 2023
1 parent 04878fa commit 56dd2d0
Showing 1 changed file with 17 additions and 23 deletions.
40 changes: 17 additions & 23 deletions doc/htmldoc/developer_space/workflows/nest_with_ides.rst
Original file line number Diff line number Diff line change
Expand Up @@ -425,27 +425,21 @@ running NEST. The description here was tested on Ubuntu 23.
Setting up the project
~~~~~~~~~~~~~~~~~~~~~~
1. :ref:`Clone NEST <git_workflow>` onto your computer or select ``Get from VCS`` from CLion's start window
2. First setup CMake
.. image:: ../../static/img/clion_cmake_config.png
3. Add the following CMake option: ``-DPython_ROOT_DIR=[path/to/root/of/python/env]``
4. Then add a run configuration
.. image:: ../../static/img/clion_run_configuration.png
5. Add a ``custom build application``
6. Set the ``PYTHONPATH``` environment variable: ``PYTHONPATH=[build/dir]/install/lib/python3.9/site-packages:$PYTHONPATH``
7. Add a custom target
.. image:: ../../static/img/clion_custom_build_targets.png
8. Add an external build tool
.. image:: ../../static/img/clion_external_tools.png
9. The working directory should be set to the build directory set in the cmake configuration before
.. image:: ../../static/img/clion_custom_build_targets.png
2. You will be prompted to setup CMake. You can find the CMake configuration in the settings (Build,Execution,Deployment --> CMake) to make more changes at a later point. Make the following changes and press "Ok":
* Generator: "Let CMake decide"
* CMake options: "-DCMAKE_INSTALL_PREFIX=[YOUR BUILD DIRECTORY]/install -DPython_ROOT_DIR=[YOUR PYTHON ENV ROOT] -Wunused-parameter -Wall -Wextra -Werror -Dwith-optimize=OFF -Dwith-debug=ON"
* Build directory: "[YOUR BUILD DIRECTORY]"
3. Edit the run configurations by clicking on "Edit configurations" in the dropdown in the top right corner.
4. Add a ``custom build application``
5. Set the following values:
* Environment variables: ``PYTHONPATH=[YOUR BUILD DIRECTORY]/install/lib/python3.[YOUR PYTHON MINOR VERSION]/site-packages:$PYTHONPATH``
* Working directory: [YOUR NEST REPO ROOT]
* Executable: [YOUR PYTHON ENV ROOT]/bin/python3
6. Add a custom target by clicking on "Configure Custom Build Targets" and give it a name of your choice
7. Add an external build tool by clicking on the three dots next to the "Build" dropdown menu and give it a name of your choice again. Then set the following values:
* Program: [PATH TO MAKE EXECUTABLE] (usually /usr/bin/make)
* Arguments: -j $(nproc) install
* Working directory: [YOUR BUILD DIRECTORY]
You can now run any python script using NEST and debug the C++ code. To debug Python code, use Pycharm instead (does not require any setup whatsoever).

0 comments on commit 56dd2d0

Please sign in to comment.