Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I change the working directory for my program

Tags:

cmake

clion

Trying out the Clion EAP on the Mac. How does one change the current working directory for a launched program? It appears to be set to the output directory of the binaries.

like image 658
sfjac Avatar asked Sep 14 '14 15:09

sfjac


People also ask

Can programs change the working directory?

Most programming languages provide an interface to the file system functions of the operating system, including the ability to set (change) the working directory of the program.

What command is used to change your working directory?

The cd command, also known as chdir (change directory), is a command-line shell command used to change the current working directory in various operating systems.

How do I change the current working directory to my local project?

To change this current working directory, you can use the "cd" command (where "cd" stands for "change directory"). For example, to move one directory upwards (into the current folder's parent folder), you can just call: $ cd ..


1 Answers

This can be changed via the Run -> Edit Configurations... dialog, just like Idea.

The mix of needing to make changes to CMakeLists.txt for so much of the configuration just threw me, and I've been hunting for a way to change it there, but this bit at least is consistent with the other IDEs, which is good.

Hopefully they'll improve the rest of the Project Settings in a similar fashion.

like image 112
sfjac Avatar answered Oct 14 '22 11:10

sfjac