V
V
vipermagi2016-06-10 10:02:02
C++ / C#
vipermagi, 2016-06-10 10:02:02

How to make CLion copy the configs directory to the Debug output directory next to the binary?

Compiling a project in CLion. Somewhere in the settings it is specified that Debug will be created in some directory, into which CLion will copy the compiled files.

I wrote the following line in CMakeLists.txt:

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config/utils.cfg ${CMAKE_CURRENT_BINARY_DIR}/config/utils.cfg COPYONLY)


began to throw the config directory with the file inside next to the binary, but only in the ~/.CLion subdirectories. As I understand it, it first collects the binary in ~/.CLion, and then copies it from there to the place specified by me in the settings. But it does not copy the config together with the binary to Debug.

How to be?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question