[cmake-developers] [CMake] namespace support

Michael Wild themiwi at gmail.com
Thu Feb 3 14:30:47 EST 2011


On 02/03/2011 08:04 PM, Bill Hoffman wrote:
> On 2/3/2011 12:20 PM, Peter Kümmel wrote:
>> On 03.02.2011 17:20, Peter Kümmel wrote:
>>> Because good solution is not available
>>> I've added the mentioned namespace support
>>> to CMake:
>>>
>>> namespace(<string>)
>>> endnamespace()
>>>
>>> With attached patch it is possible to write
>>> code like this (imagine antiX.cpp does not
>>> compile when the macro X is set):
>>>
>>> namespace(x)
>>> add_definitions(-DX)
>>> add_library(X x.cpp)
>>> endnamespace()
>>> add_library(antiX antiX.cpp)
>>>
>>>
>>> The ticket is here
>>> http://www.cmake.org/Bug/view.php?id=11793
>>>
>>>
>>> I hope it could be added in this or an
>>> similar form to CMake.
>>>
>>
>> For simpler testing I've uploaded
>> Windows and Linux binaries here:
>>
>> https://sourceforge.net/projects/cmakescript/files/CMake%20namespace/
>>
> 
> This would be better discussed on the cmake-developers mailing list.
> 
> -Bill

Although I consider the functionality this patch adds to be useful and
desirable, I would prefer to have INCLUDE_DIRECTORIES target and
source-file properties.

My 2c...

Michael




More information about the cmake-developers mailing list