Version: 4.0.1 (using KDE 4.4.5) OS: Linux I configure my cmake-based project using environment variables when I run cmake (e.g. to set the compiler to icecc). I tried to set these variables in the "Environment" part of the global Kdevelop settings but they are not used when CMake is run when I do "Configure Projects". Am I missing something ? Is it a bug ? Hope this helps, Romain Reproducible: Always Steps to Reproduce: 1. in a CMakeLists.txt, add a MESSAGE("foo ? " $ENV{FOO} ) 2. check in a shell that "FOO=BAR cmake ..." does echo "foo ? BAR" 3. in the environment variables part of kdevelop's configuration dialog, add variable=FOO value=BAR 4. run cmake by using the menu "Project->Configure selection" Actual Results: The FOO variable is empty, and the MESSAGE only echoes "foo ? " Expected Results: I would have expected the environment variables to be set for all jobs (cmake, compilation, etc). I use zsh as my login shell.
You should get the same environment variables as the ones that were defined when kdevelop was started. If that's not what you want, please reopen as a wish. Thanks
Facing same issue, cmake cannot get the Environment variables Also reported here https://stackoverflow.com/questions/9856251/how-can-i-get-kdevelop-to-recognize-environment-variables-in-ubuntu
The linked stackoverflow thread has the answer to your question as well: you most probably do not have your environment variables exported in the environment you start KDevelop from (krunner, menu, ...). Try starting it from the shell: then it should work. If that is not the issue, please re-open.
Oh my mistake, not a bug, thank you !