diff --git a/Documentation/CLionConfiguration.md b/Documentation/CLionConfiguration.md index 54e138aeea4..26627413331 100644 --- a/Documentation/CLionConfiguration.md +++ b/Documentation/CLionConfiguration.md @@ -2,19 +2,13 @@ CLion can integrate with CMake to provide code comprehension features. -After opening the `ladybird` repository in CLion as a new project, the "`Open Project Wizard`" window will open, from here set the following fields: +After opening the `ladybird` repository in CLion as a new project, the "`Open Project Wizard`" window will open. -(Assuming you use `Ninja` as the build system and configured the CMake build directory to `Build/ladybird`) +Select the `default` Preset in the `Settings -> Build, Execution and Deployment -> CMake` window and click the `Enable Profile` checkbox. -`CMake Options`: -``` --DSERENITY_CACHE_DIR=$CMakeProjectDir$/Build/caches --GNinja -``` - -`Build Directory`: `Build/ladybird` - -If you already have the project open, you can go to `File -> Settings -> Build, Execution, Deployment -> CMake` to find these options. +If the build complains that there is no `Default` Toolchain, go to the `Settings -> Build, Execution and Deployment -> Toolchains` +tab and copy the currently defaulted host toolchain and rename it to `Default`. Make sure that the compiler chosen has a version of +at least gcc-13 or clang-17. ## Excluding Build Artifacts diff --git a/Documentation/CLion_Add_Configuration.png b/Documentation/CLion_Add_Configuration.png deleted file mode 100644 index f289181b5f9..00000000000 Binary files a/Documentation/CLion_Add_Configuration.png and /dev/null differ diff --git a/Documentation/CLion_Add_Configuration_Existing.png b/Documentation/CLion_Add_Configuration_Existing.png deleted file mode 100644 index d03c15db504..00000000000 Binary files a/Documentation/CLion_Add_Configuration_Existing.png and /dev/null differ diff --git a/Documentation/QtCreatorConfiguration.md b/Documentation/QtCreatorConfiguration.md index e45fecd0edd..9d47ac91bbe 100644 --- a/Documentation/QtCreatorConfiguration.md +++ b/Documentation/QtCreatorConfiguration.md @@ -16,11 +16,8 @@ First, make sure you have a working toolchain and can build and run Ladybird. Go * Add the following `#define`s to the file: ``` #define ENABLE_UNICODE_DATA 1 - //#define ENABLE_COMPILETIME_FORMAT_CHECK - - #define __serenity__ + #define ENABLE_COMPILETIME_FORMAT_CHECK #define SANITIZE_PTRS 1 - #define __SSE__ ``` * Edit the `ladybird.cxxflags` file to say `-std=c++23 -fsigned-char -fconcepts -fno-exceptions -fno-semantic-interposition -fPIC` * Edit the `ladybird.includes` file to list the following lines: @@ -29,11 +26,10 @@ First, make sure you have a working toolchain and can build and run Ladybird. Go Userland/ Userland/Libraries/ Userland/Services/ - Toolchain/Local/x86_64/x86_64-pc-serenity/include/c++/13.1.0 - Build/x86_64/ - Build/x86_64/Userland/ - Build/x86_64/Userland/Libraries/ - Build/x86_64/Userland/Services/ + Build/ladybird/ + Build/ladybird/Userland/ + Build/ladybird/Userland/Libraries/ + Build/ladybird/Userland/Services/ AK/ ``` @@ -87,8 +83,3 @@ In QtCreator, select the menu "Tools", item "Options", section "C++", tab "File Naming" (don't ask me why it's here). At the bottom there should be the option "License template:". Click "Browse…", select your file (i.e., `license-template.creator`). Click "OK", and you're done! :) - -## Compiler Kits - -You can slightly improve how well Qt interprets the code by adding and setting up an appropriate "compiler kit". -For that you will need to reference the compilers at `Toolchain/Local/x86_64/bin/x86_64-pc-serenity-gcc` and `Toolchain/Local/x86_64/bin/x86_64-pc-serenity-g++`. diff --git a/Documentation/VSCodeConfiguration.md b/Documentation/VSCodeConfiguration.md index 240056b7492..4407e756ad1 100644 --- a/Documentation/VSCodeConfiguration.md +++ b/Documentation/VSCodeConfiguration.md @@ -6,12 +6,18 @@ The WSL Remote extension allows you to use VS Code in Windows while using the no The recommended extensions for VS Code include: +- [CMake Tools](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools) - [clangd](https://marketplace.visualstudio.com/items?itemName=llvm-vs-code-extensions.vscode-clangd) - [GitLens](https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens) +## Configuration + +The CMake Tools plugin should automatically detect the `CMakePresets.json` at the root of the repository. +Selecting and activating the `default` preset should be enough to get started. + ## Code comprehension -Clangd has the best support for cross-compiling workflows, especially if configured as noted below. The Microsoft C/C++ tools can work, but require a lot more configuration and may not understand the sysroot in use. +Clangd has the best support for modern compilers, especially if configured as noted below. The Microsoft C/C++ tools can work, but may require more configuration. ### clangd @@ -126,7 +132,7 @@ These belong in the `.vscode/settings.json` of Serenity. "Toolchain/Build/**": true, "Build/**": true, }, - // Force clang-format to respect Serenity's .clang-format style file. This is not necessary if you're not using the Microsoft C++ extension. + // Force clang-format to respect Ladybird's .clang-format style file. This is not necessary if you're not using the Microsoft C++ extension. "C_Cpp.clang_format_style": "file", // Tab settings "editor.tabSize": 4,