[CMake] cmake my_BouncyBall
Richard Wackerbarth
richard at NFSNet.org
Sun Nov 7 06:34:47 EST 2010
First let me suggest that you word your request in a more complete manner.
What "does not work"? What were you expecting and what did you get?
It is difficult, if not impossible, for us to guess.
I suspect that the problem is related to the ">" (specifying the output file in Unix).
Are you on a Un*x platform? Remember that CMake uses a different syntax because it assumes that the platform may not be Unix-based.
I also have no idea just what "BouncyBall" is supposed to do with the additional command line arguments.
They look very much like a call to the Unix "diff" command to verify that the output matches some previous version (stored in BouncyBall.out)
Provide additional details. Then we may be able to be more helpful.
Richard
On Nov 7, 2010, at 6:08 AM, luxInteg wrote:
> Greetings,
>
> I am learning cmake. and I have taken the following from an old Makefile:-
> INC = ../include/BouncyBall.h
>
> BouncyBall: BouncyBall.c library $(INC)
> ${CC} ${CFLAGS} -o BouncyBall BouncyBall.c ../lib/libOLD.a
> ./BouncyBall > my_BouncyBall.out - diff BouncyBall.out my_BouncyBall.out
>
> and 'translated' for cmake as the following:-
> -----------------------
> add_executable(BouncyBall BouncyBall.c)
> find_library(OLD_LIBRARY OLD)
> target_link_libraries(BouncyBall ${OLD_LIBRARY})
> COMMAND(./BouncyBall > my_BouncyBall.out
> - diff BouncyBall.out my_BouncyBall.out)
> install(TARGETS
> BouncyBall
> BouncyBall.out
> my_BouncyBall.out
> DESTINATION bin)
> -----------------------
> but it does not work
>
> advice would be appreciated
>
> sincerely
> luxInteg
More information about the CMake
mailing list