Re: [CMake] namespace support

2011-02-03 Thread Peter Kümmel
On 03.02.2011 20:04, Bill Hoffman wrote: https://sourceforge.net/projects/cmakescript/files/CMake%20namespace/ This would be better discussed on the cmake-developers mailing list. Indeed, this is the wrong list for this. Somehow I missed that there is a devel list. Peter -Bill ___

Re: [CMake] namespace support

2011-02-03 Thread Bill Hoffman
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() endnamespace() With attached patch it is possible to write code like this (imagine antiX.cpp does not compi

Re: [CMake] namespace support

2011-02-03 Thread Peter Kümmel
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() endnamespace() With attached patch it is possible to write code like this (imagine antiX.cpp does not compile when the macro X is set): names

Re: [CMake] namespace support

2011-02-03 Thread Peter Kümmel
The patch was buggy, haven't tested it with a fresh build. Attached the updated patch. Peter diff --git a/Source/cmBootstrapCommands.cxx b/Source/cmBootstrapCommands.cxx index 554f452..809cff4 100644 --- a/Source/cmBootstrapCommands.cxx +++ b/Source/cmBootstrapCommands.cxx @@ -56,40 +56,41 @@ #i

Re: [CMake] namespace support

2011-02-03 Thread Peter Kümmel
Because good solution is not available I've added the mentioned namespace support to CMake: namespace() 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

Re: [CMake] namespace support

2011-02-03 Thread Michael Wild
On 02/03/2011 09:59 AM, Peter Kümmel wrote: > On 03.02.2011 00:56, Michael Jackson wrote: >> >> On Feb 2, 2011, at 6:38 PM, Peter Kümmel wrote: >> >>> On 02.02.2011 16:39, Michael Jackson wrote: On Feb 2, 2011, at 10:21 AM, Peter Kümmel wrote: > On 02.02.2011 16:17, Michael Wild

Re: [CMake] namespace support

2011-02-03 Thread Peter Kümmel
On 03.02.2011 00:56, Michael Jackson wrote: On Feb 2, 2011, at 6:38 PM, Peter Kümmel wrote: On 02.02.2011 16:39, Michael Jackson wrote: On Feb 2, 2011, at 10:21 AM, Peter Kümmel wrote: On 02.02.2011 16:17, Michael Wild wrote: namespace(a) include_directories(a) add_library(a MOD

Re: [CMake] namespace support

2011-02-02 Thread Michael Jackson
On Feb 2, 2011, at 6:38 PM, Peter Kümmel wrote: > On 02.02.2011 16:39, Michael Jackson wrote: >> >> On Feb 2, 2011, at 10:21 AM, Peter Kümmel wrote: >> >>> On 02.02.2011 16:17, Michael Wild wrote: > namespace(a) > include_directories(a) > add_library(a MODULE a/a.cpp) >

Re: [CMake] namespace support

2011-02-02 Thread Peter Kümmel
On 02.02.2011 17:18, Michael Hertling wrote: On 02/02/2011 04:21 PM, Peter Kümmel wrote: On 02.02.2011 16:17, Michael Wild wrote: namespace(a) include_directories(a) add_library(a MODULE a/a.cpp) endnamespace() Put a CMakeLists.txt file in a/ and b/ and do the include_directories(

Re: [CMake] namespace support

2011-02-02 Thread Michael Hertling
On 02/02/2011 04:21 PM, Peter Kümmel wrote: > On 02.02.2011 16:17, Michael Wild wrote: >>> namespace(a) >>> include_directories(a) >>> add_library(a MODULE a/a.cpp) >>> endnamespace() >>> >> Put a CMakeLists.txt file in a/ and b/ and do the include_directories() > > Exactly this is what

Re: [CMake] namespace support

2011-02-02 Thread Eric Noulard
2011/2/2 Michael Wild : > > Put a CMakeLists.txt file in a/ and b/ and do the include_directories() > and add_library() calls in there. That's the only way to have separate > include directories since there is no corresponding target property > (which admittedly would be nice to have). As a workar

Re: [CMake] namespace support

2011-02-02 Thread Peter Kümmel
On 02.02.2011 16:17, Michael Wild wrote: namespace(a) include_directories(a) add_library(a MODULE a/a.cpp) endnamespace() Put a CMakeLists.txt file in a/ and b/ and do the include_directories() Exactly this is what I don't wanna do and why I've asked ;) Seems it becomes a feature r

Re: [CMake] namespace support

2011-02-02 Thread Michael Wild
On 02/02/2011 04:08 PM, Peter Kümmel wrote: > I wanna build several targets in one CMakeLists.txt, > because I have many simple one-file-only plugins with > the same build rules, for instance: > > include_directories(a) > add_library(a MODULE a/a.cpp) > > include_directories(b) > add_library(b MO

[CMake] namespace support

2011-02-02 Thread Peter Kümmel
I wanna build several targets in one CMakeLists.txt, because I have many simple one-file-only plugins with the same build rules, for instance: include_directories(a) add_library(a MODULE a/a.cpp) include_directories(b) add_library(b MODULE b/b.cpp) The problem is that all include_directories