<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="ProgId" content="Word.Document"><meta name="Generator" content="Microsoft Word 12"><meta name="Originator" content="Microsoft Word 12"><link rel="File-List" href="file:///C:%5CDOCUME%7E1%5Cabridges%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml"><link rel="themeData" href="file:///C:%5CDOCUME%7E1%5Cabridges%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx"><link rel="colorSchemeMapping" href="file:///C:%5CDOCUME%7E1%5Cabridges%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml"><style>
<!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;
        mso-font-alt:"Calisto MT";
        mso-font-charset:0;
        mso-generic-font-family:roman;
        mso-font-pitch:variable;
        mso-font-signature:-1610611985 1107304683 0 0 159 0;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;
        mso-font-alt:"Century Gothic";
        mso-font-charset:0;
        mso-generic-font-family:swiss;
        mso-font-pitch:variable;
        mso-font-signature:-1610611985 1073750139 0 0 159 0;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;
        mso-font-charset:0;
        mso-generic-font-family:modern;
        mso-font-pitch:fixed;
        mso-font-signature:-1610611985 1073750091 0 0 159 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {mso-style-unhide:no;
        mso-style-qformat:yes;
        mso-style-parent:"";
        margin:0in;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-ascii-font-family:Calibri;
        mso-ascii-theme-font:minor-latin;
        mso-fareast-font-family:Calibri;
        mso-fareast-theme-font:minor-latin;
        mso-hansi-font-family:Calibri;
        mso-hansi-theme-font:minor-latin;
        mso-bidi-font-family:"Times New Roman";
        mso-bidi-theme-font:minor-bidi;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        mso-themecolor:hyperlink;
        text-decoration:underline;
        text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-noshow:yes;
        mso-style-priority:99;
        color:purple;
        mso-themecolor:followedhyperlink;
        text-decoration:underline;
        text-underline:single;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-noshow:yes;
        mso-style-priority:99;
        mso-style-link:"Plain Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:10.5pt;
        font-family:Consolas;
        mso-fareast-font-family:Calibri;
        mso-fareast-theme-font:minor-latin;
        mso-bidi-font-family:"Times New Roman";
        mso-bidi-theme-font:minor-bidi;}
span.EmailStyle16
        {mso-style-type:personal;
        mso-style-noshow:yes;
        mso-style-unhide:no;
        mso-ansi-font-size:11.0pt;
        mso-bidi-font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-ascii-font-family:Calibri;
        mso-ascii-theme-font:minor-latin;
        mso-fareast-font-family:Calibri;
        mso-fareast-theme-font:minor-latin;
        mso-hansi-font-family:Calibri;
        mso-hansi-theme-font:minor-latin;
        mso-bidi-font-family:"Times New Roman";
        mso-bidi-theme-font:minor-bidi;
        color:windowtext;}
span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-noshow:yes;
        mso-style-priority:99;
        mso-style-unhide:no;
        mso-style-locked:yes;
        mso-style-link:"Plain Text";
        mso-ansi-font-size:10.5pt;
        mso-bidi-font-size:10.5pt;
        font-family:Consolas;
        mso-ascii-font-family:Consolas;
        mso-hansi-font-family:Consolas;}
.MsoChpDefault
        {mso-style-type:export-only;
        mso-default-props:yes;
        mso-ascii-font-family:Calibri;
        mso-ascii-theme-font:minor-latin;
        mso-fareast-font-family:Calibri;
        mso-fareast-theme-font:minor-latin;
        mso-hansi-font-family:Calibri;
        mso-hansi-theme-font:minor-latin;
        mso-bidi-font-family:"Times New Roman";
        mso-bidi-theme-font:minor-bidi;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;
        mso-header-margin:.5in;
        mso-footer-margin:.5in;
        mso-paper-source:0;}
div.Section1
        {page:Section1;}
-->
</style>
<p class="MsoNormal">Hi All,</p><p class="MsoNormal"></p><p class="MsoNormal"><br></p><p class="MsoNormal">I’m attempting to add dependencies for generated code into
my builds.<span style=""> </span>I have read the wiki article
that J Decker posted to me in my last query</p>
<p class="MsoPlainText"><a href="http://www.vtk.org/Wiki/CMake_FAQ#How_can_I_add_a_dependency_to_a_source_file_which_is_generated_in_a_subdirectory.3F">http://www.vtk.org/Wiki/CMake_FAQ#How_can_I_add_a_dependency_to_a_source_file_which_is_generated_in_a_subdirectory.3F</a></p>
<p class="MsoPlainText"><br></p><p class="MsoPlainText">, but unfortunately, it doesn’t
answer my current question. Neither has creative use of search keys turned up
anything helpful.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">The problem is : the files that are generated are not
dependencies of the top level target (as discussed in the article), they are
dependencies of another source file because they are generated includes. <span style=""> </span>If I add the dependency to the executable,
there’s no guarantee that the order will be correct, from what I see.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">i.e.</p>
<p class="MsoNormal"><span style=""> </span>message compiler runs
in directory A, produces a .txt output containing string definitions.</p>
<p class="MsoNormal"><span style=""> </span>Generated file is
included into an RC file in directory B, within the correct RC context.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">The piece I’m missing is how to hook a source file as a top
level target, without having to reimplement the compilation phase as a custom
rule.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">The makefile equivalent of all this is very simply :</p>
<p class="MsoNormal"><span style=""> </span>myResource.rc :
externalGeneratedFile.txt</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">This feels like fairly common usage, so I’m sure I’ve just missed
something, but I’m not sure what.</p><p class="MsoNormal"><br></p><p class="MsoNormal">many thanks <br></p><p class="MsoNormal">/t</p><p class="MsoNormal"><br></p>