mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 04:44:59 +00:00
Documentation: Add Kernel/Userland quick switch to CLion configuration
This commit is contained in:
parent
da1c3c5262
commit
916e093d4a
3 changed files with 21 additions and 0 deletions
|
@ -56,6 +56,27 @@ following options under `Settings -> Editor -> Code Style -> C/C++`:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
## Quick switching between Kernel and Userland targets
|
||||||
|
|
||||||
|
In order to let CLion know what kind of code you're currently working on (Kernel / Userland) to make sure it parses and displays the correct half of statements like this:
|
||||||
|
```c++
|
||||||
|
#ifdef KERNEL
|
||||||
|
...
|
||||||
|
#else
|
||||||
|
...
|
||||||
|
#endif
|
||||||
|
```
|
||||||
|
You need to add build configurations for each:
|
||||||
|
|
||||||
|
Click on one of the buttons below (top right of the IDE) - If you have the second one, press Edit Configurations after the dropdown box opens, then press CTRL+A to select the 1000s of automatically generated targets, and then press Delete to remove them.
|
||||||
|
|
||||||
|

|
||||||
|

|
||||||
|
|
||||||
|
Then press the `+` button to add a new configuration, select `CMake Application`, name the configuration `Kernel`, set the target to `Kernel` (typing while the dropdown box is open searches), and then repeat the process one more time, this time with the name being `Userland` and the target being `true`.
|
||||||
|
|
||||||
|
Finally, to quickly switch between the two different contexts, simply click the `Kernel | Default` / `Userland | Default` button to switch.
|
||||||
|
|
||||||
## Notes for WSL Users
|
## Notes for WSL Users
|
||||||
|
|
||||||
It is possible to set the embedded terminal in CLion to the one that your WSL distribution provides.
|
It is possible to set the embedded terminal in CLion to the one that your WSL distribution provides.
|
||||||
|
|
BIN
Documentation/CLion_Add_Configuration.png
Normal file
BIN
Documentation/CLion_Add_Configuration.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
BIN
Documentation/CLion_Add_Configuration_Existing.png
Normal file
BIN
Documentation/CLion_Add_Configuration_Existing.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
Loading…
Add table
Add a link
Reference in a new issue