Out of source builds

Answered

hi,

 

whenever I import an existing CMake based project I would like to do what I normally do running CMake manually which is

 

/Xxxxx 

/Xxxxx.bin

 

where Xxxxx is the source folder containing the CMakeLists.txt file.

And Xxxxx.bin is the output binaries, solution, etc. 

is it possible to configure CLion so it always follows the pattern?

 

i need to have the source completely untouched....

 

thanks 

0
3 comments

Hi! You can change the location of the generated CMake files using the Generation path option in CMake profile.

0

WIll this work?

 

../${PROJECT_NAME}.bin

0

Currently it's not possible to use variables in the Generation path option. I've created the feature request about it: https://youtrack.jetbrains.com/issue/CPP-12481. Feel free to comment or upvote.

For now you can specify either an absolute path (e.g. C:\CLion Projects\My Project\CMake Files\cmake-build-debug) or a relative to the current project root path (e.g cmake-build-debug).

0

Please sign in to leave a comment.