CLion cmake can not find external commands like 'python'

Hi!

I have been trying CLion to switch from AppCode to CLion for C++ development.

Currently, I am blocked in CLion due to an issue with our CMake project model.

I am using internal macros to perform some operations while generating the xcode project (for Appcode). These macros sometime uses external tools, like 'jar' from the JDK or 'python'.

From the terminal, everything works ok (python/jar is in the PATH env variable), so executing the CMAKE execute_process with the jar and python command works fine.
https://cmake.org/cmake/help/v3.0/command/execute_process.html

However, if I try CLion to load the project model from the CMakelists.txt, the execute_process command fails as 'jar' and 'python' can not be found. I have tried checking the checkbox for passing the env variables to Cmake into the CLion cmake settings, but the problem does not go away.

Any help will be much appreciated! Thx!

Please sign in to leave a comment.