Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To reset the output directory of an executable file in CLion IDE, you can follow these steps:

  1. In the project view, right-click on the executable file and select "Properties" from the context menu.
  2. In the properties dialog, click on the "C/C++ Application" tab.
  3. Under the "Target" section, you will see the current output directory. Click on the "Browse" button next to it.
  4. Navigate to the new output directory and click "OK".
  5. Click "Apply" to save the changes and close the dialog.

Alternatively, you can modify the CMakeLists.txt file directly to specify the new output directory. Simply add the line below to the CMakeLists.txt file and replace the "path/to/new/directory" with the actual path to the new output directory.

set(CMAKERUNTIMEOUTPUT_DIRECTORY "path/to/new/directory")

Be sure to save the changes and reload the CMake project in CLion to apply the new output directory.