On 6/12/2012 3:55 PM, David Cole wrote:
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.

Yeah, it worked for visual studio, but as you said, may not work uniformly

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.

http://cmake.org/cmake/help/v2.8.8/cmake.html#command:remove_definitions

I'll check that one out instead
Thanks!



HTH,
David


On Tue, Jun 12, 2012 at 6:16 PM, Totte Karlsson <[email protected]
<mailto:[email protected]>> wrote:

    Seem
    that add_definitions(/UTheSymbol) did the job!

    -totte


    On 6/12/2012 2:57 PM, Totte Karlsson wrote:

        Hi,
        I have a folder in which I build a library. For doing so I have a
        add_definitions(-DMySymbol) line

        It seems that subfolders inherits this,which I don't want. How do I
        "undef" the
        MySymbol symbol in a subfolder CMakeList file?

        -totte

    --

    Powered by www.kitware.com <http://www.kitware.com>

    Visit other Kitware open-source projects at
    http://www.kitware.com/__opensource/opensource.html
    <http://www.kitware.com/opensource/opensource.html>

    Please keep messages on-topic and check the CMake FAQ at:
    http://www.cmake.org/Wiki/__CMake_FAQ <http://www.cmake.org/Wiki/CMake_FAQ>

    Follow this link to subscribe/unsubscribe:
    http://www.cmake.org/mailman/__listinfo/cmake
    <http://www.cmake.org/mailman/listinfo/cmake>


--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to