Cmake: use add_custom_command to copy binary to specific location failed when location doesn't exist?

Just make sure that the target location "bin" exists before invoking the copy command, i.e.

Just make sure that the target location "bin" exists before invoking the copy command, i.e. : ADD_CUSTOM_COMMAND(TARGET example POST_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_BINARY_DIR} COMMAND ${CMAKE_COMMAND} -E copy ${EXAMPLE_BIN_NAME} ${PROJECT_BINARY_DIR}/. ).

Yes, that was my workaround, but I was hoping for a better solution. Thank you anyway for your answer! – hush-hush May 26 at 3:35.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions