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
You can convert to native paths with FILE(TO_NATIVE_PATH path result)
Thanks Filipe. Much more cleaner way.
I was using only the Mastering CMake book, but I'm observing a lot of
improvements from 2.2 to 2.4 version. Now I'll always look at CMake help.
try ${CMAKE_COMMAND} -E
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
Wouldn't it be better to have the compilation destination be where the tests
expect?
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake
-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
Hello all,
I'm experiencing a problem in EXECUTE_PROCESS command.
My test set needs some image files to execute. On Linux, it works fine
with make test because I use the same directory to source code and to
build.
On Windows (Visual Studio) the file is built in the
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Vitor Vasconcelos Araujo Silva wrote:
Hello all,
I'm experiencing a problem in EXECUTE_PROCESS command.
My test set needs some image files to execute. On Linux, it works fine
with make test because I use the same