From 1be6c12501707f246b9f10c5db3f875b5a3a09dc Mon Sep 17 00:00:00 2001 From: Hermes Junior Date: Wed, 30 Oct 2024 12:15:43 +0100 Subject: [PATCH] Documentation: Explain how to fix CMake errors in CLion When importing the project in some CLion versions, the build profile can be created missing configurations, breaking code insight. --- .../EditorConfiguration/CLionConfiguration.md | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/Documentation/EditorConfiguration/CLionConfiguration.md b/Documentation/EditorConfiguration/CLionConfiguration.md index 14ae5a918ee..66d27648e62 100644 --- a/Documentation/EditorConfiguration/CLionConfiguration.md +++ b/Documentation/EditorConfiguration/CLionConfiguration.md @@ -28,6 +28,31 @@ A symptom of this not being configured correctly is CLion giving a warning for e To make code generated by CLion match the SerenityOS coding style, import the `CLionCodeStyleSettings.xml` from this directory as code style scheme via `Settings -> Editor -> Code Style -> C/C++ -> Scheme -> Cog icon -> Import Scheme...` +## CMake Error Messages + +This section outlines common CMake error messages and provides guidance on how to resolve them. + +### Unable to Find Package + +You may encounter an error message similar to the following: + +``` +CMake Error at AK/CMakeLists.txt:60 (find_package): +By not providing "Findsimdutf.cmake" in CMAKE_MODULE_PATH, this project has +requested CMake to find a package configuration file for "simdutf", but +CMake could not locate one. +... +``` + +This error typically arises when CLion is not configured to use the correct build directory. + +**Solution**: Ensure that CLion's build directory is set to the correct build directory for the selected profile. +Navigate to `Settings -> Build, Execution, Deployment -> CMake` and in your selected profile, set the `Build directory` according to the profile: +- Default -> "`Build/ladybird`" +- Debug -> "`Build/ladybird-debug`" +- Sanitizer -> "`Build/ladybird-sanitizers`" + + ## Notes for WSL Users ### Toolchain