[CMake] EXECUTE_PROCESS - I can't copy files on Windows

Vitor Vasconcelos Araujo Silva vasconcv at loria.fr
Thu Mar 22 02:59:24 EST 2007


	Hello Filipe,

	It was really not necessary. I was getting an errors because my 
teste.txt file WAS moved. (My mistake, of course).
	I put the code inside a FOREACH loop and it worked fine.
	Thanks a lot,

	Vitor

> Hi!
> 
> You need to specify the full path of teste.txt
> 
> EXECUTE_PROCESS(
>    COMMAND ${CMAKE_COMMAND} -E copy
>    ${PROJECT_SOURCE_DIR}/teste.txt
>    ${PROJECT_BINARY_DIR}/mytest
>    RESULT_VARIABLE resultado
>    ERROR_VARIABLE erro)
> 
> This will copy teste.txt from your project source directory to your
> project binary directory.
> 
> There are other variables you can use for full path:
> http://www.cmake.org/Wiki/CMake_Useful_Variables#Locations
> http://www.cmake.org/mailman/listinfo/cmake


More information about the CMake mailing list