[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: moc isn't being called for the output of custom commands
From:       Michael Spencer <spencers1993 () gmail ! com>
Date:       2013-04-21 0:57:26
Message-ID: 2105475.fgub7881XS () kubuntu
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Saturday, April 20, 2013 07:15:12 PM argonel wrote:


Hi,




On Sat, Apr 20, 2013 at 5:55 PM, Michael Spencer <spencers1993@gmail.com[1]> wrote:


Hello,

I have a small script that helps to generate parts of a Qt class. I then call it from \
a CMake file, using a couple custom commands in a function:


 
<snip> 


Here is the part that doesn't work. Although the the custom commands are called and \
work great, moc doesn't get called on the resulting files. However, if I generate the \
files by hand, and than manually add the copied source file to the list of sources, \
moc does get called. The list of source files is identical regardless of whether I \
add the file by hand or it gets added as a result of the custom commands. It's just \
the moc doesn't get called if the file is produced as a result of a custom command.

I am doing the custom commands wrong? How do I fix this so moc is called on the \
output of my custom commands?





I did this about a year ago, I've put it on techbase (in a temporary location) now \
due to the length of the lines: http://techbase.kde.org/User:Argonel/mocGenerated[2]

There may be a "more correct" method, but as it wasn't intended for permanent use I \
didn't put much effort into it beyond making it work.



Regards, Eli


Thank you so much! That works perfectly!

Michael Spencer

--------
[1] mailto:spencers1993@gmail.com
[2] http://techbase.kde.org/User:Argonel/mocGenerated


[Attachment #5 (unknown)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" \
"http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" \
content="1" /><style type="text/css"> p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'OxygenSans'; font-size:9pt; \
font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">On Saturday, April 20, 2013 07:15:12 PM argonel wrote:<br /></p> \
<p style=" margin-top:12px; margin-bottom:0px; margin-left:40px; margin-right:40px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Hi,<br /></p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br /></p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">On Sat, Apr 20, 2013 at 5:55 \
PM, Michael Spencer &lt;<a href="mailto:spencers1993@gmail.com"><span style=" \
text-decoration: underline; color:#0057ae;">spencers1993@gmail.com</span></a>&gt; \
wrote:<br /></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:45px; \
margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Hello,<br \
/><br />I have a small script that helps to generate parts of a Qt class. I then call \
it from a CMake file, using a couple custom commands in a function:<br /></p> <p \
style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;"> </p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&lt;snip&gt;<br /> <br /></p> \
<p style=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:40px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Here is the part that doesn't \
work. Although the the custom commands are called and work great, moc doesn't get \
called on the resulting files. However, if I generate the files by hand, and than \
manually add the copied source file to the list of sources, moc does get called. The \
list of source files is identical regardless of whether I add the file by hand or it \
gets added as a result of the custom commands. It's just the moc doesn't get called \
if the file is produced as a result of a custom command.<br /><br />I am doing the \
custom commands wrong? How do I fix this so moc is called on the output of my custom \
commands?<br /><br /></p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;"><br /></p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">I did this about a year ago, I've put it on techbase (in a \
temporary location) now due to the length of the lines: <a \
href="http://techbase.kde.org/User:Argonel/mocGenerated"><span style=" \
text-decoration: underline; \
color:#0057ae;">http://techbase.kde.org/User:Argonel/mocGenerated</span></a><br /><br \
/></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:40px; \
margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">There may \
be a &quot;more correct&quot; method, but as it wasn't intended for permanent use I \
didn't put much effort into it beyond making it work.<br /><br /></p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Regards, Eli<br /></p> <p \
style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Thank you so much! That works \
perfectly!</p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p> \
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Michael \
Spencer</p></body></html>



>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic