Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add description about how to use pixi in CLion #117

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions gettingstarted/CLion.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,28 @@ If you don't already have CLion installed, download it, license it, install it p

**IDE:** From upper left, choose Project from Version Control. Use https://github.com/FreeCAD/FreeCAD
![Pict8](./resources/CLionPythonDebug8.png)

### Configure Pixi Toolchain (Optional)
If you choose to use Pixi to get the dependencies then you need to configure a CLion toolchain and assign it to your CMake profile.
1. Run `pixi shell` in the local FreeCAD directory to get all packages, this is also needed to update the environment after the `pixi.toml` has been changed.
2. Go to Settings → Build, Execution, Deployment → Toolchains.
3. Create a new "System" toolchain.
4. Click on "Add environment" and select "From file".
5. Enter the location of the `pixi-default.bat` for Windows or otherwise the `pixi-default.bash` script in the "Environment file" field. The file can be found in the FreeCAD repository in contrib/clion/pixi

![PixiPict1](./resources/CLionPixi1.png)

6. Go to Settings → Build, Execution, Deployment → CMake.
7. Select the "conda-[your os]-debug" or "conda-[your os]-release" preset and duplicate it.
8. Enable the duplicated profile and assign the created toolchain to this profile.
9. If on Windows, you also need to select the Visual Studio generator.

![PixiPict2](./resources/CLionPixi2.png)

Note: If CMake does not detect any packages from the .pixi folder then the toolchain script may have failed.
This may be resolved by using the absolute path to your FreeCAD repository in the `pixi-default.bash` script.


### Building CMake

CLion should automatically refresh the CMake build for the application. You see results or rerun using the cmake
Expand Down
Binary file added gettingstarted/resources/CLionPixi1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gettingstarted/resources/CLionPixi2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.