Search code examples
makefilecmakeclionctest

How to change Clion build directory


I am learning to use CLion IDE these days. I am trying to change the default path of build directory:

~/.CLion2016.2/system/cmake/generated/AFQMCLIB-83788a76/83788a76/Debug

I can change by:

  1. Go to build execution deployment
  2. Click cmake
  3. Change build output path to MYPATH

After making this change. I rebuild my code, all the targets now appears in MYPATH/Debug/, however there is no Makefile in MYPATH/Debug/.

I am using CTest, I want to run make test to test my program. If there is no Makefile in MYPATH, I need to run every test executable to test my code. (I will have a lot of executable, it is not convenient to run them individually )

Is there a way to move everything in build to MYPATH? Thank you.


Solution

  • I think you need to wait:

    https://confluence.jetbrains.com/display/CLION/Roadmap+for+CLion+2016.3

    Cmake:

    Ability to specify the build/generation output directory.