How to change default working directory in Clion EAP on the Mac?
Every time when I create new project, I need to change it to project location.

- 128
- 1
- 9
-
I can not believe this is still unsolved :( I guess a symlink will have to do :( – Konstantin Gredeskoul Jan 24 '16 at 02:46
2 Answers
First of all, it is not possible to change the working directory through the GUI of CLion (see second question in "CMake configuration" section in Source) but you can ask the developers to add this feature in the future (see this).
On the other hand, as far as I know, it is not possible to automatically add set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
in the CMakeList.txt, but if I find a solution, I will write it here.

- 173
- 1
- 1
- 9
Are you still having this problem?
I just tried the following: I closed all of my projects to get back to the "Welcome to CLion" dialog. I selected "New Project" from the Quick Start menu on the right. This brings up a "New CMake Project" dialog. I then entered a new path under Project Location. The last segment of the project is interpreted as the Project Name
. Click OK to create the new project.
The next time you create a new project, it should remember the location as shown here.

- 7,119
- 5
- 45
- 69
-
1Problem still unsolved. I meant that I need to change working directory(Run->Edit Configurations...->Working directory) You asked this before [link](http://stackoverflow.com/questions/25834878/how-do-i-change-the-working-directory-for-my-program), but I need to set here the project location by default. – Viktor Shatrov Nov 15 '14 at 09:58
-
1it is helped to me to add this line `set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")` but I don't know how to add it to cmake automatically when I create new project – Viktor Shatrov Nov 15 '14 at 11:01
-