Skip to content
DavidHerreros edited this page Mar 3, 2020 · 8 revisions

CLion

CLion is an C++ oriented IDE created by JetBrains that offer most of the capabilities included in other popular IDEs develped by the company like Pycharm.

How to install

CLion can be downloaded from the webpage of JetBrains (CLion is not a free software. The user needs a valid license to access the IDE). After following the instructions of the wizard, CLion should be appropiately installed in your machine.

Git

CLion supports Git integration by default, so it is not needed to add any extra configuration to the IDE.

Debugging a program

Although CLion mainly supports projects structured around a CMake file, it is also possible to configure it to build and debug other custom softwares.

In the case of Xmipp, it will be needed to add several configurations to specify CLion how to handle the software.

The first step is to specify to CLion where is the file used by Xmipp to build its binaries. The following image summarizes how to set up this configuration.

Screenshot from 2020-03-03 13-14-02

Once the tool needed to compile Xmipp inside CLion is configured, it will be needed to create a new run configuration to debug the executable of interest. The following image shows the window to set up the run configuration.

Screenshot from 2020-03-03 13-23-18

The parameters to be filled up are the following:

  • Target: Here we should select the build configuration created previously.
  • Executable: Path to the executable file (usually located in the folder build/bin).
  • Arguments: Inputs needed to call the executable
  • Environment variables: Here we should add the following variables:
LD_LIBRARY_PATH=Path/To/Scipion/software/lib:Path/To/Xmipp/build/lib:Path/To/Xmipp/build/bindings/python:
PYTHONPATH=Path/To/Xmipp/build/bindings/python:Path/To/Xmipp/build/pylib:
XMIPP_HOME=Path/To/Xmipp/build
XMIPP_NOSCIPION=True
XMIPP_SRC=Path/To/Xmipp/src

Once both, the build and the run configuration are ready, Xmipp can be compiled and debugged inside CLion.

Clone this wiki locally