[Cmake] ADD_CUSTOM_COMMAND problems
Kevin Wright
Kevin . Wright at ansys . com
Fri, 10 Oct 2003 17:37:38 -0400
This is a multi-part message in MIME format.
------_=_NextPart_001_01C38F76.B9B56D76
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I'm having some trouble getting ADD_CUSTOM_COMMAND to work in one part =
of my setup. I have one section of the code where I create a =
pre-processing command which works perfectly:
ADD_CUSTOM_COMMAND(OUTPUT ${MocFile} COMMAND ${MOC_EXE}=20
ARGS ${Header} -o ${MocFile} DEPENDS ${Header} COMMENT =
moc_${BaseName}.cxx)
Then, a few lines later, I use another ADD_CUSTOM_COMMAND to copy a dll =
into my project like so:
ADD_CUSTOM_COMMAND(OUTPUT =
${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/${BaseName}
COMMAND ${CANMET_BINARY_DIR}/copy.exe
ARGS ${DLL} ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}
DEPENDS ${DLL}
COMMENT ${BaseName}=20
)
(where copy.exe is just an executable that copies without complaining =
about forward slashes on windows)
This does not even show up in the VC++ list of targets. I've tried =
using ADD_DEPENDENCIES to tie it to the main executable building, but =
that doesn't seem to help.
Am I making a stupid mistake? Do I fundamentally misunderstand =
something about this? Any help would be great.
Thanks,
Kevin.
------_=_NextPart_001_01C38F76.B9B56D76
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
6.0.6249.1">
<TITLE>ADD_CUSTOM_COMMAND problems</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P><FONT SIZE=3D2 FACE=3D"Arial">I'm having some trouble getting =
ADD_CUSTOM_COMMAND to work in one part of my setup. I have one =
section of the code where I create a pre-processing command which works =
perfectly:</FONT></P>
<P><FONT SIZE=3D2 FACE=3D"Arial"> ADD_CUSTOM_COMMAND(OUTPUT =
${MocFile} COMMAND ${MOC_EXE} </FONT>
<BR> <FONT SIZE=3D2 =
FACE=3D"Arial">ARGS ${Header} -o ${MocFile} DEPENDS ${Header} COMMENT =
moc_${BaseName}.cxx)</FONT>
</P>
<P><FONT SIZE=3D2 FACE=3D"Arial">Then, a few lines later, I use another =
ADD_CUSTOM_COMMAND to copy a dll into my project like so:</FONT>
</P>
<P><FONT SIZE=3D2 FACE=3D"Arial"> =
ADD_CUSTOM_COMMAND(OUTPUT =
${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/${BaseName}</FONT>
<BR> <FONT SIZE=3D2 =
FACE=3D"Arial">COMMAND ${CANMET_BINARY_DIR}/copy.exe</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial"> ARGS ${DLL} =
${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial"> DEPENDS =
${DLL}</FONT>
<BR> <FONT SIZE=3D2 =
FACE=3D"Arial">COMMENT ${BaseName} </FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial"> )</FONT>
</P>
<P><FONT SIZE=3D2 FACE=3D"Arial">(where copy.exe is just an executable =
that copies without complaining about forward slashes on windows)</FONT>
</P>
<P><FONT SIZE=3D2 FACE=3D"Arial">This does not even show up in the VC++ =
list of targets. I've tried using ADD_DEPENDENCIES to tie it to =
the main executable building, but that doesn't seem to help.</FONT></P>
<P><FONT SIZE=3D2 FACE=3D"Arial">Am I making a stupid mistake? Do =
I fundamentally misunderstand something about this? Any help would =
be great.</FONT>
</P>
<P><FONT SIZE=3D2 FACE=3D"Arial">Thanks,</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">Kevin.</FONT>
</P>
</BODY>
</HTML>
------_=_NextPart_001_01C38F76.B9B56D76--