[Cmake] ADD_CUSTOM_COMMAND etc
Andy Cedilnik
andy.cedilnik at kitware.com
Mon Apr 14 08:46:14 EDT 2003
Hi Neil,
Here is my CMakeLists.txt and Makefile. The platform is Debian Linux,
CMake is 1.6.6.
Andy
On Mon, 2003-04-14 at 00:50, Neil Killeen wrote:
> Andy
>
> I don't know what is happening. I have used your example exactly, and made
> an in source build (usually I do out of source) and still the Makefile
> (attached) contains no custom commands
>
> I did
>
> . Create file (your example)
> . Run cmake in location of file
>
> % cmake .
>
>
> On looking at the resultant Makefile there are no custom commands
> (no sign of Latex etc). I am using CMake 1.6. I did this with both
> Solaris and Linux with the same outcome.
>
> Can you send me the Makefile you got (and tell me what
> platform you generated it on) so I can see how it differs from mine.
>
>
>
> regards
> Neil
>
>
>
>
>
>
> On 10 Apr 2003, Andy Cedilnik wrote:
>
> > Hi Neil,
> >
> > I just tried this:
> >
> > PROJECT(Test)
> >
> > SET (LATEX_COMPILE latex)
> >
> > SET(DOC_ROOT ${Test_SOURCE_DIR}/Documentation)
> >
> > ADD_CUSTOM_TARGET (LaTeXDocument ALL)
> > ADD_CUSTOM_COMMAND(
> > SOURCE ${DOC_ROOT}/junk.tex
> > COMMAND ${LATEX_COMPILE}
> > ARGS ${DOC_ROOT}/junk.tex
> > TARGET LaTeXDocument
> > OUTPUTS ${Test_BINARY_DIR}/junk.dvi
> > )
> > ADD_CUSTOM_COMMAND(
> > SOURCE LaTeXDocument
> > TARGET LaTeXDocument
> > DEPENDS ${Test_BINARY_DIR}/junk.dvi
> > )
> >
> > And it works fine.
> >
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile
Type: text/x-makefile
Size: 9337 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake/attachments/20030414/a2bdd543/attachment.bin>
-------------- next part --------------
PROJECT(Test)
SET (LATEX_COMPILE latex)
SET(DOC_ROOT ${Test_SOURCE_DIR}/Documentation)
ADD_CUSTOM_TARGET (LaTeXDocument ALL)
ADD_CUSTOM_COMMAND(
SOURCE ${DOC_ROOT}/junk.tex
COMMAND ${LATEX_COMPILE}
ARGS ${DOC_ROOT}/junk.tex
TARGET LaTeXDocument
OUTPUTS ${Test_BINARY_DIR}/junk.dvi
)
ADD_CUSTOM_COMMAND(
SOURCE LaTeXDocument
TARGET LaTeXDocument
DEPENDS ${Test_BINARY_DIR}/junk.dvi
)
More information about the CMake
mailing list