[CMake] namespace support

Bill Hoffman bill.hoffman at kitware.com
Thu Feb 3 14:04:06 EST 2011


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


More information about the CMake mailing list