[CMake] Post-build copy

pellegrini pellegrini at ill.fr
Fri Jul 1 05:29:18 EDT 2011


Forget my question. I placed my add_custom_command at th wrong place ...

sorry

Eric

pellegrini a écrit :
> Hello everybody,
>
> I build a static fortran library using CMake 2.8.0. Once the built is 
> done I would like to copy the library archive and its related Fortran 
> mod files stored in say, my_dir1, in another directory say, my_dir2. 
> Looking on the mailing list and on the web, I tried the following but 
> nothing happens:
>
> ADD_CUSTOM_COMMAND(
>    TARGET crysfml
>    POST_BUILD
>    COMMAND ${CMAKE_COMMAND} -E make_directory my_dir2
>    COMMAND ${CMAKE_COMMAND} -E copy_directory my_dir1 my_dir2)
>
> Am I doing something wrong ? Any idea ?
>
> thanks a lot
>
> See you
>
> Eric
>


-- 
Eric Pellegrini
Calcul Scientifique
Institut Laue-Langevin
Grenoble, France



More information about the CMake mailing list