err, nevermind, i think that is a non-standard option or something. I am compiling someone&#39;s existing code and that is something leftover I think.<br><br>-Derek<br><br><div class="gmail_quote">On Mon, Jul 16, 2012 at 11:44 AM, 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">Hello,<br><br>I have a CMake project with a few sub-projects to be built as well. In one of the sub projects I want to compile to a shared object. I used the line <br>
<br>

<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#808000">add_library</span>(myfiles<span style="color:#c0c0c0"> </span>SHARED<span style="color:#c0c0c0"> </span>myfiles.c<span style="color:#c0c0c0"></span><span style="color:#c0c0c0"></span>)</pre>

<br>in the main project&#39;s CMakeLists.txt I have <br><br>

<pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style="color:#808000">SET</span>(CMAKE_C_FLAGS_DEBUG<span style="color:#c0c0c0"> </span><span style="color:#008000">&quot;-g</span><span style="color:#c0c0c0"> </span><span style="color:#008000">-fPIC</span><span style="color:#c0c0c0"> </span><span style="color:#008000">-O0</span><span style="color:#c0c0c0"> </span><span style="color:#008000">-pipe</span><span style="color:#c0c0c0"> </span><span style="color:#008000">-std=c99</span><span style="color:#c0c0c0"> </span><span style="color:#008000">-wOff</span><span style="color:#c0c0c0"></span><span style="color:#008000"></span><span style="color:#c0c0c0"></span><span style="color:#008000"></span><span style="color:#c0c0c0"></span><span style="color:#008000">&quot;</span>)</pre>

<br><br>and yet I am getting an error that &quot;Off is not a file or directory&quot; because the compile line looks like:<br><br>

<p style="margin:0px;text-indent:0px"><span style>usr/bin/gcc  -g -fPIC -O0 -pipe -std=c99 Off -dynamiclib -Wl,-headerpad_max_install_names   ....</span></p><p style="margin:0px;text-indent:0px"><br><span style></span></p>

<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><span style>so it seems like cmake stripped off the -w from -wOff? Is this a bug? It doesnt seem to be a problem if I change the library to &quot;STATIC&quot; instead of SHARED</span><br>

</p>
</blockquote></div><br>