SUMMARY I have several environment profiles, but only the default seems to be taken into account. If I create a new env. profile and set it i.e. for ninja build, it's not used and kdevelop still uses the default one. STEPS TO REPRODUCE 1. Create a new env profile with some vars 2. Change it for the build system or running the application 3. OBSERVED RESULT The new environment is not used, so kdevelop is still using the default EXPECTED RESULT Expected that kdevelop was using the env profile I set SOFTWARE/OS VERSIONS Windows: MacOS: Linux/KDE Plasma: (available in About System) KDE Plasma Version: 5.12.7 KDE Frameworks Version: 5.47.0 Qt Version: 5.9.5 ADDITIONAL INFORMATION
Created attachment 136075 [details] Minimal CMake example This bug is still present in KDevelop 5.6.2. I've attached a minimalist CMakeLists.txt file that shows the behavior. Building the project (the buildenv target) simply prints the environment variables. The output allows you to easily observe that the selected environment profile is not used. This bug only applies when using Ninja to run the build. Using Make it works as expected.
A possibly relevant merge request was started @ https://invent.kde.org/kdevelop/kdevelop/-/merge_requests/423
Git commit 6795582dce86d3766e596e240bfe2e5ada52d6c0 by Christoph Roick. Committed on 05/01/2023 at 13:21. Pushed by croick into branch 'master'. Apply Ninja environment settings The Ninja configuration page offers to select a build environment. This setting is now applied when creating a corresponding NinjaJob. FIXED-IN: 5.11.230400 M +2 -0 plugins/ninjabuilder/ninjabuilder.cpp https://invent.kde.org/kdevelop/kdevelop/commit/6795582dce86d3766e596e240bfe2e5ada52d6c0