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.
This commit is contained in:
Hermes Junior 2024-10-30 12:15:43 +01:00 committed by Sam Atkins
parent d0d5600f47
commit 1be6c12501
Notes: github-actions[bot] 2024-11-01 16:23:36 +00:00

View file

@ -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