Thanks - that seemed to work. I was under the impression I could specify where I wanted the .c file to go with the 2nd argument. I had tried this way before, but i didnt notice I think I had a syntax error in my .l file causing the compile to not complete.<br>
<br>Thanks<br><br>-Derek<br><br><div class="gmail_quote">On Mon, Dec 17, 2012 at 2:09 PM, Eric Noulard <span dir="ltr"><<a href="mailto:eric.noulard@gmail.com" target="_blank">eric.noulard@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br><br><div class="gmail_quote"><div class="im">2012/12/17 Derek Cole <span dir="ltr"><<a href="mailto:derek.cole@gmail.com" target="_blank">derek.cole@gmail.com</a>></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"><<a href="mailto:derek.cole@gmail.com" target="_blank">derek.cole@gmail.com</a>></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><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><div class="im"><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></div>the FLEX_TARGET macro should be printing something out when running.<span class="HOEnZb"><font color="#888888"><br>
<br clear="all"></font></span></div><span class="HOEnZb"><font color="#888888"><br>-- <br>
Erk<br>Le gouvernement représentatif n'est pas la démocratie -- <a href="http://www.le-message.org" target="_blank">http://www.le-message.org</a><br>
</font></span></blockquote></div><br>