-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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

- --
Filipe Sousa

Vitor Vasconcelos Araujo Silva wrote:
>       Shame on me, reply my own post, but I fixed the small error, but I'm 
> still no able to copy files:
> 
>       The code follows:
> 
>       EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy teste.txt mytest
>               RESULT_VARIABLE resultado
>               ERROR_VARIABLE erro )
> 
>       MESSAGE ("resultado: " ${resultado})
>       MESSAGE ("erro: " ${erro})
> 
>       I tried too change ${CMAKE_COMMAND} to only cmake and got the same 
> error.
> 
> C:\Documents and Settings\vasconcv\work\conta\mylib>cmake .
> -- Who am I? Windows
> --- Copying TEST files arguments needed to performe unit tests...
> resultado: 1
> erro: Error copying file "teste.txt" to "mytest".
> 
> -- Configuring done
> -- Generating done
> -- Build files have been written to: C:/Documents and 
> Settings/vasconcv/work/conta/mylib
> 
> C:\Documents and Settings\vasconcv\work\conta\mylib>
> 
>       Thanks a lot,
> 
>       Vitor
> 
> Vitor Vasconcelos Araujo Silva a écrit:
> 
> _______________________________________________
> CMake mailing list
> [email protected]
> http://www.cmake.org/mailman/listinfo/cmake
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGAZ4ObQdNYqwwwCwRArfgAJ43XUdKpsGl5n4vCS90pUk2xZyWvQCfc14H
4/lPVZz2/TCxofc3CugQ7J0=
=5alP
-----END PGP SIGNATURE-----
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to