<br><br><div class="gmail_quote">2012/12/17 Derek Cole <span dir="ltr">&lt;<a href="mailto:derek.cole@gmail.com" target="_blank">derek.cole@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Replying to fix the subject<br><br><div class="gmail_quote">On Mon, Dec 17, 2012 at 1:45 PM, Derek Cole <span dir="ltr">&lt;<a href="mailto:derek.cole@gmail.com" target="_blank">derek.cole@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div>



<div>
    
    <table>
    <tbody><tr>
    <td>
        

<div>
    
    <br><span title="View upvote and downvote totals"></span>
       

 
</div>

    </td>
    
<td>
<div>          
    <div>
        <p>I am trying to figure out what I am doing wrong when trying to use just flex in a Cmake file to build a shared lib.</p>

<p>i basically have the following</p>

<pre><code><span>find_package</span><span>(</span><span>FLEX</span><span>)</span><span>
FLEX_TARGET</span><span>(</span><span>Test</span><span> </span><span>../</span><span>src</span><span>/</span><span>test</span><span>.</span><span>l </span><span>../</span><span>src</span><span>/</span><span>test</span><span>.</span><span>c</span><span>)</span><span>
</span><span>set</span><span>(</span><span>SRC_FILES mysource</span><span>.</span><span>c $</span><span>{</span><span>FLEX_Test_OUTPUTS</span><span>})</span><span>
add_libary</span><span>(</span><span>testlib $</span><span>{</span><span>SRC_FILES</span><span>})</span><span>
target_link_libraries</span><span>(</span><span>testlib crypto c $</span><span>{</span><span>FLEX_LIBRARIES</span><span>})</span></code></pre>

<p>this is giving me a problem saying it cant find ../src/test.c</p></div></div></td></tr></tbody></table></div></div></blockquote></div></blockquote><div><br>Could you try using absolute path for FLEX output:<br><br><pre>
<code><span>FLEX_TARGET</span><span>(</span><span>Test</span><span> </span><span>../</span><span>src</span><span>/</span><span>test</span><span>.</span><span>l </span><span>${CMAKE_CURRENT_BINARY_DIR}</span><span>/</span><span>test</span><span>.</span><span>c</span><span>)</span></code></pre>
<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div><table><tbody><tr><td><div><div>

<p>any ideas how I can make sure Lex ran first? secondly,how can i pass 
my -L and -d options to lex (like I am doing in my normal, pre-cmake 
version of this makefile)</p></div></div></td></tr></tbody></table></div></div></blockquote></div></blockquote><br>the FLEX_TARGET macro should be printing something out when running.<br><br clear="all"></div><br>-- <br>
Erk<br>Le gouvernement représentatif n&#39;est pas la démocratie -- <a href="http://www.le-message.org" target="_blank">http://www.le-message.org</a><br>