Please do not use anything except for -D args with add_definitions. Other flags should be added to CMAKE_CXX_FLAGS or some other variable, and they are compiler specific. I doubt that "/U" works uniformly across compilers the same way -D does.<br>
<br>The remove_definitions command is the opposite of the add_definitions command, but it still takes its arguments exactly as add_definitions does, with "-D" prefixes.<br><br> <a href="http://cmake.org/cmake/help/v2.8.8/cmake.html#command:remove_definitions">http://cmake.org/cmake/help/v2.8.8/cmake.html#command:remove_definitions</a><br>
<br><br>HTH,<br>David<br><br><br><div class="gmail_quote">On Tue, Jun 12, 2012 at 6:16 PM, Totte Karlsson <span dir="ltr"><<a href="mailto:totte@dunescientific.com" target="_blank">totte@dunescientific.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Seem<br>
that add_definitions(/UTheSymbol) did the job!<span class="HOEnZb"><font color="#888888"><br>
<br>
-totte</font></span><div class="im HOEnZb"><br>
<br>
On 6/12/2012 2:57 PM, Totte Karlsson wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
I have a folder in which I build a library. For doing so I have a<br>
add_definitions(-DMySymbol) line<br>
<br>
It seems that subfolders inherits this,which I don't want. How do I "undef" the<br>
MySymbol symbol in a subfolder CMakeList file?<br>
<br>
-totte<br>
<br>
</blockquote>
--<br>
<br></div><div class="HOEnZb"><div class="h5">
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/<u></u>opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/<u></u>CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/<u></u>listinfo/cmake</a><br>
</div></div></blockquote></div><br>