How do i define the build directory?

Hi,
I'm having issues defining where the binaries are put. They seem to be put in "/Users/johndoe/Library/Caches/clion10/cmake/generated/fdee202b/fdee202b/Release" from the looks of the output in the builtin terminal. This behaviour appears for both Release target and similar for Debug target. I'm using Clion on Mac OS X Yosemite 10.10.1

It seems utterly useless to me, for release builds to be put in temporary folders and not in the project directory.

Any ides on how I build to the project directory instead?

1 comment
Comment actions Permalink

You can do something like this:

 
if(CMAKE_BUILD_TYPE STREQUAL "Release")
    set_target_properties(TargetName PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR})
endif()
0

Please sign in to leave a comment.