I've been having issues with changing the build directory via CLion. I've tried: set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "bin")
but it does not seem to change and remains the same (/home/adil/.clion10/system/cmake/generated/c05c962b/c05c962b/Debug/Project
).
I have also tried the workaround specified here, but that too does not seem to work.
Does anyone have a solution for this problem?
CLion v2016. To change build output path, go to Build, Execution, Deployment | CMake settings and set it there. Alternatively, you can configure the RUNTIME_OUTPUT_DIRECTORY property in your CMakeLists. txt file.
Go to Settings / Preferences | Build, Execution, Deployment | CMake. , and CLion will add a new profile to the list. Change the profile name, build type, and other settings as required.
You need to prefix your bin
with the path to the current directory your project resides in. You can use ${CMAKE_CURRENT_SOURCE_DIR}
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/bin")
Be sure to add this before related add_executable
directive(s) in your CMakeLists.txt file.
Go to Settings -> CMake and specify relative or absolute pass where you would like your build files to be stored in 'Build output path' field. For instance ./bin will output build files in YourProject/bin/Debug/yourExeFile.exe
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With