I\'m trying to create a simple project on CLion. It uses CMake (I\'m new here) to generate Makefiles to build project (or some sort of it)
All I need to is transfer
I would suggest TARGET_FILE_DIR if you want the file to be copied to the same folder as your .exe file.
$ Directory of main file (.exe, .so.1.2, .a).
add_custom_command(
TARGET ${PROJECT_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_CURRENT_SOURCE_DIR}/input.txt
$)
In VS, this cmake script will copy input.txt to the same file as your final exe, no matter it's debug or release.