Re: [CMake] add_subdirectory namespaces

2019-07-25 Thread Robert Maynard
Subsequent calls to project() from sub-directories is supported. For calls to project from sub-directories it does everything but set CMAKE_PROJECT_NAME. On Wed, Jul 24, 2019 at 7:29 AM Jason Beach wrote: > > I've been reorganizing / updating our software cmake build. It currently uses > a

[CMake] add_subdirectory namespaces

2019-07-24 Thread Jason Beach
I've been reorganizing / updating our software cmake build. It currently uses a mixture of Externa Projects and normal target definitions that depend on the external projects (which has you probably know causes much sorrow and grief). One of my goals in the reorganization was to replace all the

Re: [CMake] add_subdirectory and common libraries

2017-12-11 Thread Craig Scott
On Tue, Dec 12, 2017 at 5:13 AM, Harry Mallon wrote: > Hello all, > > Has anyone got any good recommendations for the following setup? > > “large_repo” contains code for a binary and two git submodules. One is > “library” which is added with add_subdirectory(). The

[CMake] add_subdirectory and common libraries

2017-12-11 Thread Harry Mallon
Hello all, Has anyone got any good recommendations for the following setup? “large_repo” contains code for a binary and two git submodules. One is “library” which is added with add_subdirectory(). The other is some common library “util_library” (something like gtest which is generally useful)

[CMake] add_subdirectory with EXCLUDE_FROM_ALL and cmake --build (Visual Studio)

2016-07-29 Thread Mueller-Roemer, Johannes Sebastian
I just noticed the following issue: If I do an add_subdirectory([...] EXCLUDE_FROM_ALL) and generate a VS (2015) solution, projects added in that subdirectory generate an entirely separate solution (and therefore do not appear in the main solution at all) in the corresponding binary dir

[CMake] add_subdirectory cache configuration via cmake script

2015-01-06 Thread Dario Oliveri
How can I prevent variables cache pollution in CMAKE? My real problem is the following: I have library A and library B, both libraries have some cmake variable used to configure there and there and that's ok, but what when variables are semantically duplicated? Library A depends on Library B

Re: [CMake] add_subdirectory not working as I want, need some guidance

2012-10-01 Thread Petr Kmoch
Hi Andrew. Just a clarification: do you actually need the source-gathering file (currently /project_src/code/client/core/CMakeLists.txt) to be a CMakeList? If all it does is set up some variables, you might be best off renaming it e.g. FileSetup.cmake and then including it using include(...) in

[CMake] add_subdirectory not working as I want, need some guidance

2012-09-30 Thread Andrew Fenn
Hello all, I'm a little stuck on how to get this working exactly how I want it to and I'm hoping someone here will be able to help me figure it out. My project is structured as so: /project_src/tests/client/CMakeLists.txt - Client Unit Test Project /project_src/code/client/CMakeLists.txt -

Re: [CMake] add_subdirectory inheritance (patch)

2012-04-19 Thread irukandji
Ok, guys, catch... source base is 2.8.7. add_subdirectory(source_dir [binary_dir] [EXCLUDE_FROM_ALL] [NOINHERIT]) /.../ If the NOINHERIT argument is provided, the subdirectory build configuration will not inherit any preprocessor, compiler or linker specific parameters.

Re: [CMake] add_subdirectory inheritance (patch)

2012-04-19 Thread David Cole
So, wait. This intends to avoid inheritance of preprocessor, compiler and linker stuff, but it still allows inheritance of all other directory properties and CMake variable values...? On Thu, Apr 19, 2012 at 5:04 AM, irukandji irukan...@voidptr.eu wrote: Ok, guys, catch... source base is 2.8.7.

Re: [CMake] add_subdirectory inheritance (patch)

2012-04-19 Thread irukandji
What my thought was: if you are adding the subdirectory, you want to keep what is stored within the cmake variables so you can fine grain what to use and not to use in subdirectory or pass just some settings from caller, if this would be also removed there would be no way to pass anything to

Re: [CMake] add_subdirectory inheritance (patch)

2012-04-19 Thread David Cole
If that's the case then NOINHERIT is not the correct name for this. (Because that, to me, primarily implies CMake variable value inheritance, and directory properties, and everything that inherits.) On Thu, Apr 19, 2012 at 8:48 AM, irukandji irukan...@voidptr.eu wrote: What my thought was:

Re: [CMake] add_subdirectory inheritance (patch)

2012-04-19 Thread irukandji
Change it to whatever you want :) Search and replace is for me much easyer then to workaround the inheritance :) regards, irukandji On 2012-04-19 14:56, David Cole wrote: If that's the case then NOINHERIT is not the correct name for this. (Because that, to me, primarily implies CMake variable

Re: [CMake] add_subdirectory inheritance

2012-04-18 Thread Kent Williams
I think I understand what you're trying to do better now. It's a bit off the beaten path for CMake, and has more moving parts than is strictly necessary. It could be set up as a nested suite of ExternalProjects, and avoid the definitions inheritance issue you're running into. You could also

Re: [CMake] add_subdirectory inheritance

2012-04-18 Thread irukandji
I appreciate the idea but my view is that if the solution (whatever dev. solution) is not elegant there is something wrong with it. While testing the posibilities, i had it, i have implemented the optional dont_inherit flag to add_subdirectory. Tomorrow (some testing first), I'll submit a

[CMake] add_subdirectory inheritance

2012-04-17 Thread irukandji
Hi, (as no one answered to my previous email, let me add this: multiplatform project with few million lines of code, sheer size of the project is not allowing to turn around whole directory tree as price / performance is a very relevant factor and even rewriting makefiles/vcprojs to cmake

Re: [CMake] add_subdirectory inheritance

2012-04-17 Thread Kent Williams
Frankly, I don't entirely understand what the problem is, or what your proposed solution is. What is it that you don't want the subdirectory context to inherit? On Tue, Apr 17, 2012 at 10:30 AM, irukandji irukan...@voidptr.eu wrote: Hi, (as no one answered to my previous email, let me add

[CMake] add_subdirectory inheritance

2012-04-17 Thread irukandji
Oh, hi :) Well, the add_subdirectory takes all the preprocessor defines and include/library paths defined before calling it into the added subdirectory cmakelists.txt. If cmakelists.txt A defines -DWhatever and calls add_subdirectory(/B) where the cmakelists.txt for building library B

Re: [CMake] add_subdirectory inheritance

2012-04-17 Thread Kent Williams
I think then that you shouldn't use add_subdirectory. I'd suggest using the ExternalProject module in this case, because it uncouples the subdirectory's project from the parent project. In that case, each subdirectory can be its own project and maintain private configurations. You can manage

Re: [CMake] add_subdirectory inheritance

2012-04-17 Thread irukandji
I don't know how you'd ever maintain a sane overall project if it depends on each subdirectory having conflicting compiler flags. Well here is the fun, there is not something like you, we are taling about over 100 developers and if everyone is handling his own garden, this is not a problem. I

Re: [CMake] add_subdirectory inheritance

2012-04-17 Thread irukandji
Hi, Maybe i can try to reexplain, from head, ignore syntactic errors and oversimplifying... ** /sources/cmakelist.txt /sources/binaries/helloworld ..cmakelists.txt /sources/binaries/hellocmake ..cmakelists.txt

[CMake] CMake add_subdirectory and recompiling

2011-12-21 Thread André Caron
I've recently been surprised by the behavior of CMake when modifying CMakeLists.txt files pointed to by add_subdirectory() directives. I've asked the question on StackOverflow[1] and have gotten no clean answer. If anyone is interested, there is a small bounty (50 points) on the question expiring

Re: [CMake] CMake add_subdirectory and recompiling

2011-12-21 Thread David Cole
Here's my initial shot at it: http://stackoverflow.com/questions/8479929/cmake-add-subdirectory-and-recompiling/8593372#8593372 On Wed, Dec 21, 2011 at 11:25 AM, André Caron andre.l.ca...@gmail.com wrote: I've recently been surprised by the behavior of CMake when modifying CMakeLists.txt

Re: [CMake] CMake add_subdirectory and recompiling

2011-12-21 Thread Michael Wild
On 12/21/2011 05:25 PM, André Caron wrote: I've recently been surprised by the behavior of CMake when modifying CMakeLists.txt files pointed to by add_subdirectory() directives. I've asked the question on StackOverflow[1] and have gotten no clean answer. If anyone is interested, there is a

Re: [CMake] CMake add_subdirectory and recompiling

2011-12-21 Thread David Cole
On Wed, Dec 21, 2011 at 11:56 AM, Michael Wild them...@gmail.com wrote: On 12/21/2011 05:25 PM, André Caron wrote: I've recently been surprised by the behavior of CMake when modifying CMakeLists.txt files pointed to by add_subdirectory() directives. I've asked the question on StackOverflow[1]

Re: [CMake] CMake add_subdirectory and recompiling

2011-12-21 Thread Michael Wild
On 12/21/2011 05:59 PM, David Cole wrote: On Wed, Dec 21, 2011 at 11:56 AM, Michael Wild them...@gmail.com wrote: On 12/21/2011 05:25 PM, André Caron wrote: I've recently been surprised by the behavior of CMake when modifying CMakeLists.txt files pointed to by add_subdirectory() directives.

Re: [CMake] CMake add_subdirectory and recompiling

2011-12-21 Thread Bill Hoffman
On 12/21/2011 11:56 AM, Michael Wild wrote: [1]: http://stackoverflow.com/questions/8479929/cmake-add-subdirectory-and-recompiling Get rid of the file(GLOB ...). Never, ever use it unless you know exactly what you're doing. Using it usually breaks something. Also, you didn't say *what*

Re: [CMake] CMake add_subdirectory and recompiling

2011-12-21 Thread André Caron
, André -Original Message- From: Bill Hoffman Sent: Wednesday, December 21, 2011 12:06 PM To: cmake@cmake.org Subject: Re: [CMake] CMake add_subdirectory and recompiling On 12/21/2011 11:56 AM, Michael Wild wrote: [1]: http://stackoverflow.com/questions/8479929/cmake-add-subdirectory

Re: [CMake] add_subdirectory() twice = Policy CMP0013 is not set: Duplicate binary directories are not allowed

2011-11-07 Thread Michael Hertling
On 11/04/2011 06:39 PM, Paul Hansen wrote: Hi I have several small projects. Some of them may include another project. I have one big project that includes all small projects. File structure: projects - p1.cmake (add_subdirectory(dir_project1)) - p2.cmake (add_subdirectory(dir_project2

Re: [CMake] ADD_SUBDIRECTORY() with a higher level directory

2011-11-06 Thread Daniel Dekkers
Every project's code base should be organized in the way that suits the needs best, whatever the needs may be. ;-) E.g., my personal liking for the general directory hierarchy of a project xyz - library or not - is xyz xyz examples utilities ... i.e., the project's main part is organized

Re: [CMake] ADD_SUBDIRECTORY() with a higher level directory

2011-11-06 Thread Dan Kegel
On Sun, Nov 6, 2011 at 7:27 AM, Daniel Dekkers d.dekk...@cthrough.nl wrote: This template stuff should really be in the documentation, it would have helped me a lot. More than http://www.cmake.org/cmake/help/examples.html. A library called Hello, really? FWIW, I'm gathering more examples at

Re: [CMake] ADD_SUBDIRECTORY() with a higher level directory

2011-11-06 Thread J Decker
Of course, the CMakeLists.txt in examples (or example0 and example1) depends on the actual library, so, from that level, we would like to call ADD_SUBDIRECTORY() to the *higher level* library directory... which is unacceptable for ADD_SUBDIRECTORY() (and probably conflicts with the whole

Re: [CMake] ADD_SUBDIRECTORY() with a higher level directory

2011-11-06 Thread Michael Hertling
On 11/06/2011 07:49 PM, J Decker wrote: Of course, the CMakeLists.txt in examples (or example0 and example1) depends on the actual library, so, from that level, we would like to call ADD_SUBDIRECTORY() to the *higher level* library directory... which is unacceptable for ADD_SUBDIRECTORY()

Re: [CMake] ADD_SUBDIRECTORY() with a higher level directory

2011-11-06 Thread J Decker
On Sun, Nov 6, 2011 at 5:23 PM, Michael Hertling mhertl...@online.de wrote: On 11/06/2011 07:49 PM, J Decker wrote: Of course, the CMakeLists.txt in examples (or example0 and example1) depends on the actual library, so, from that level, we would like to call ADD_SUBDIRECTORY() to the *higher

Re: [CMake] ADD_SUBDIRECTORY() with a higher level directory

2011-11-06 Thread Michael Hertling
On 11/06/2011 04:47 PM, Dan Kegel wrote: On Sun, Nov 6, 2011 at 7:27 AM, Daniel Dekkers d.dekk...@cthrough.nl wrote: This template stuff should really be in the documentation, it would have helped me a lot. More than http://www.cmake.org/cmake/help/examples.html. A library called Hello,

Re: [CMake] ADD_SUBDIRECTORY() with a higher level directory

2011-11-06 Thread Michael Hertling
On 11/07/2011 04:55 AM, J Decker wrote: On Sun, Nov 6, 2011 at 5:23 PM, Michael Hertling mhertl...@online.de wrote: On 11/06/2011 07:49 PM, J Decker wrote: Of course, the CMakeLists.txt in examples (or example0 and example1) depends on the actual library, so, from that level, we would like

Re: [CMake] ADD_SUBDIRECTORY() with a higher level directory

2011-11-05 Thread Michael Hertling
Onderwerp: Re: [CMake] ADD_SUBDIRECTORY() with a higher level directory On 11/03/2011 09:10 PM, Daniel Dekkers wrote: Hi, We are creating a directory structure for distribution of an open-source library with examples included. It looks something like this: + library - the root directory

[CMake] add_subdirectory() twice = Policy CMP0013 is not set: Duplicate binary directories are not allowed

2011-11-04 Thread Paul Hansen
Hi I have several small projects. Some of them may include another project. I have one big project that includes all small projects. File structure: projects - p1.cmake (add_subdirectory(dir_project1)) - p2.cmake (add_subdirectory(dir_project2)) - dir_project1 - dir_project2 Some

Re: [CMake] add_subdirectory() twice = Policy CMP0013 is not set: Duplicate binary directories are not allowed

2011-11-04 Thread Rolf Eike Beer
Am Freitag, 4. November 2011, 18:39:24 schrieb Paul Hansen: Hi I have several small projects. Some of them may include another project. I have one big project that includes all small projects. File structure: projects - p1.cmake (add_subdirectory(dir_project1)) - p2.cmake

[CMake] ADD_SUBDIRECTORY() with a higher level directory

2011-11-03 Thread Daniel Dekkers
Hi, We are creating a directory structure for distribution of an open-source library with examples included. It looks something like this: + library - the root directory CMakeLists.txt - create context for building (only) the library + src - contains the sources of the library

Re: [CMake] ADD_SUBDIRECTORY() with a higher level directory

2011-11-03 Thread Dan Kegel
Wait, what happens when you do add_subdirectory(..), or whatever? I thought that was standard practice. -- 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:

Re: [CMake] ADD_SUBDIRECTORY() with a higher level directory

2011-11-03 Thread Daniel Dekkers
It's standard practice if you go down your hierarchy, hence add_SUBdirectory(). But upstream? add_subdirectory(../../library)? Doesn't work. Maybe a standard include() with an absolute path, but doesn't feel right. Op 3 nov. 2011 om 21:27 heeft Dan Kegel d...@kegel.com het volgende geschreven:

Re: [CMake] ADD_SUBDIRECTORY() with a higher level directory

2011-11-03 Thread Rolf Eike Beer
Am Donnerstag, 3. November 2011, 21:39:05 schrieb Daniel Dekkers: It's standard practice if you go down your hierarchy, hence add_SUBdirectory(). But upstream? add_subdirectory(../../library)? Doesn't work. Maybe a standard include() with an absolute path, but doesn't feel right. Look at the

Re: [CMake] ADD_SUBDIRECTORY() with a higher level directory

2011-11-03 Thread Michael Hertling
On 11/03/2011 09:10 PM, Daniel Dekkers wrote: Hi, We are creating a directory structure for distribution of an open-source library with examples included. It looks something like this: + library - the root directory CMakeLists.txt - create context for building (only) the library +

Re: [CMake] add_subdirectory and eclipse project

2011-06-20 Thread Andrea Galeazzi
Il 12/02/2011 19.58, Alexander Neundorf ha scritto: On Friday 11 February 2011, Andrea Galeazzi wrote: Alexander Neundorf ha scritto: On Wednesday 09 February 2011, Andrea Galeazzi wrote: Il 08/02/2011 17.58, Alexander Neundorf ha scritto: On Tuesday 08 February 2011, Andrea Galeazzi wrote:

Re: [CMake] add_subdirectory and eclipse project

2011-02-14 Thread Andrea Galeazzi
Il 12/02/2011 19.58, Alexander Neundorf ha scritto: On Friday 11 February 2011, Andrea Galeazzi wrote: Alexander Neundorf ha scritto: On Wednesday 09 February 2011, Andrea Galeazzi wrote: Il 08/02/2011 17.58, Alexander Neundorf ha scritto: On Tuesday 08 February 2011, Andrea Galeazzi wrote:

Re: [CMake] add_subdirectory and eclipse project

2011-02-11 Thread Andrea Galeazzi
Alexander Neundorf ha scritto: On Wednesday 09 February 2011, Andrea Galeazzi wrote: Il 08/02/2011 17.58, Alexander Neundorf ha scritto: On Tuesday 08 February 2011, Andrea Galeazzi wrote: Il 18/01/2011 19.17, Alexander Neundorf ha scritto: On Tuesday 18 January 2011,

Re: [CMake] add_subdirectory and eclipse project

2011-02-09 Thread Andrea Galeazzi
Il 08/02/2011 17.58, Alexander Neundorf ha scritto: On Tuesday 08 February 2011, Andrea Galeazzi wrote: Il 18/01/2011 19.17, Alexander Neundorf ha scritto: On Tuesday 18 January 2011, Andrea Galeazzi wrote: ... I just read that wiki page but what I didn't find is how can I see

Re: [CMake] add_subdirectory and eclipse project

2011-02-08 Thread Andrea Galeazzi
Il 18/01/2011 19.17, Alexander Neundorf ha scritto: On Tuesday 18 January 2011, Andrea Galeazzi wrote: ... I just read that wiki page but what I didn't find is how can I see the sources referenced by the add_subproject function in the layout of eclipse project. You mean add_subdirectory(),

Re: [CMake] add_subdirectory and eclipse project

2011-02-08 Thread Alexander Neundorf
On Tuesday 08 February 2011, Andrea Galeazzi wrote: Il 18/01/2011 19.17, Alexander Neundorf ha scritto: On Tuesday 18 January 2011, Andrea Galeazzi wrote: ... I just read that wiki page but what I didn't find is how can I see the sources referenced by the add_subproject function in the

Re: [CMake] add_subdirectory and eclipse project

2011-01-18 Thread Andrea Galeazzi
Il 14/01/2011 13.38, Ryan Pavlik ha scritto: You probably want to read this: http://www.cmake.org/Wiki/Eclipse_CDT4_Generator Ryan On Fri, Jan 14, 2011 at 3:49 AM, Andrea Galeazzi galea...@korg.it mailto:galea...@korg.it wrote: I've been puzzled over the following problem for about 3/4

Re: [CMake] add_subdirectory and eclipse project

2011-01-18 Thread Alexander Neundorf
On Tuesday 18 January 2011, Andrea Galeazzi wrote: ... I just read that wiki page but what I didn't find is how can I see the sources referenced by the add_subproject function in the layout of eclipse project. You mean add_subdirectory(), right ? In other words, CMake generates an eclipse

[CMake] add_subdirectory and eclipse project

2011-01-14 Thread Andrea Galeazzi
I've been puzzled over the following problem for about 3/4 days: if I have a CMakeLists.txt with a lot of add_subdirectory how can I automatically generate an eclipse project (containing the source code) for each add_subdirectory? ___ Powered by

Re: [CMake] add_subdirectory and eclipse project

2011-01-14 Thread Ryan Pavlik
You probably want to read this: http://www.cmake.org/Wiki/Eclipse_CDT4_Generator Ryan On Fri, Jan 14, 2011 at 3:49 AM, Andrea Galeazzi galea...@korg.it wrote: I've been puzzled over the following problem for about 3/4 days: if I have a CMakeLists.txt with a lot of add_subdirectory how can I

Re: [CMake] add_subdirectory and link_directories

2011-01-11 Thread Rolf Eike Beer
On 01/10/2011 06:24 PM, Andrea Galeazzi wrote: I've got a main project which relies on several sub-library projects, so the main CMakeLists.txt add_subdirectory(W:/Omega/Kernel ${CMAKE_CURRENT_BINARY_DIR}/myLib1) ... and then I also specify the directory where all libraries have

Re: [CMake] add_subdirectory and link_directories

2011-01-11 Thread Thomas Petazzoni
Hello, On Tue, 11 Jan 2011 01:42:47 +0100 Michael Hertling mhertl...@online.de wrote: Since CMake prefers to specify libraries by path instead of using -l/-L or the like, there's usually no need for the LINK_DIRECTORIES() command, IMO. Sorry to jump into the discussion, but I'm having a

Re: [CMake] add_subdirectory and link_directories

2011-01-11 Thread Andreas Pakulat
On 11.01.11 10:27:02, Thomas Petazzoni wrote: Hello, On Tue, 11 Jan 2011 01:42:47 +0100 Michael Hertling mhertl...@online.de wrote: Since CMake prefers to specify libraries by path instead of using -l/-L or the like, there's usually no need for the LINK_DIRECTORIES() command, IMO.

Re: [CMake] add_subdirectory and link_directories

2011-01-11 Thread Hendrik Sattler
Zitat von Thomas Petazzoni thomas.petazz...@free-electrons.com: On Tue, 11 Jan 2011 01:42:47 +0100 Michael Hertling mhertl...@online.de wrote: Since CMake prefers to specify libraries by path instead of using -l/-L or the like, there's usually no need for the LINK_DIRECTORIES() command, IMO.

[CMake] add_subdirectory and link_directories

2011-01-10 Thread Andrea Galeazzi
I've got a main project which relies on several sub-library projects, so the main CMakeLists.txt add_subdirectory(W:/Omega/Kernel ${CMAKE_CURRENT_BINARY_DIR}/myLib1) ... and then I also specify the directory where all libraries have been built (by setting ARCHIVE_OUTPUT_DIRECTORY for

Re: [CMake] add_subdirectory and link_directories

2011-01-10 Thread Michael Hertling
On 01/10/2011 06:24 PM, Andrea Galeazzi wrote: I've got a main project which relies on several sub-library projects, so the main CMakeLists.txt add_subdirectory(W:/Omega/Kernel ${CMAKE_CURRENT_BINARY_DIR}/myLib1) ... and then I also specify the directory where all libraries have

Re: [CMake] add_subdirectory and build directory

2009-09-15 Thread Marcel Loose
are re-built... It's still a mystery for me ! Thanks again Pierre-Julien VILLOUD -Message d'origine- De : Marcel Loose [mailto:lo...@astron.nl] Envoyé : vendredi 11 septembre 2009 18:09 À : Pierre-Julien Villoud Cc : cmake@cmake.org Objet : Re: [CMake] add_subdirectory and build

Re: [CMake] add_subdirectory and build directory

2009-09-15 Thread Pierre-Julien Villoud
 : Pierre-Julien Villoud Cc : cmake@cmake.org Objet : RE: [CMake] add_subdirectory and build directory Hi Pierre-Julien, You are right. You don't need add_dependencies() when specifying link dependencies using target_link_libraries(). The latter, BTW, is of course the preferred way to do this. Without

Re: [CMake] add_subdirectory and build directory

2009-09-15 Thread Pierre-Julien Villoud
Villoud Envoyé : mardi 15 septembre 2009 10:17 À : Marcel Loose Cc : cmake@cmake.org Objet : Re: [CMake] add_subdirectory and build directory I found my problem Here are 2 CMakeLists.txt : === CMakeLists.txt : libMaths : #Minimum Cmake version required

Re: [CMake] add_subdirectory and build directory

2009-09-15 Thread Marcel Loose
-Message d'origine- De : Marcel Loose [mailto:lo...@astron.nl] Envoyé : mardi 15 septembre 2009 09:38 À : Pierre-Julien Villoud Cc : cmake@cmake.org Objet : RE: [CMake] add_subdirectory and build directory Hi Pierre-Julien, You are right. You don't need add_dependencies() when

Re: [CMake] add_subdirectory and build directory

2009-09-15 Thread Pierre-Julien Villoud
septembre 2009 13:28 À : Pierre-Julien Villoud Cc : cmake@cmake.org Objet : RE: [CMake] add_subdirectory and build directory Aah, I see now what the problem really is. You're building in two different directories. So, you will end up with two versions of libMaths. That exactly explains the output you're

Re: [CMake] add_subdirectory and build directory

2009-09-14 Thread Pierre-Julien Villoud
d'origine- De : Marcel Loose [mailto:lo...@astron.nl] Envoyé : vendredi 11 septembre 2009 18:09 À : Pierre-Julien Villoud Cc : cmake@cmake.org Objet : Re: [CMake] add_subdirectory and build directory Hi Pierre-Julien, I think I see what the problem is. You didn't specify any dependencies. You

Re: [CMake] add_subdirectory and build directory

2009-09-12 Thread Michael Wild
On 11. Sep, 2009, at 16:45, Bill Hoffman wrote: That's NOT what add_subdirectory is made for. It is intended for adding a sub-directory in the source tree. So, if your directory structure looks like this (i.e. B is a sub-project of A) A/CMakeLists.txt A/B/CMakeLists.txt things are

[CMake] add_subdirectory and build directory

2009-09-11 Thread Pierre-Julien Villoud
Hi everyone, After unsuccessfully looking for an answer on Google, I contact you. I have a question regarding the use of add_subdirectory. When a project A is depending on a project B, I add the following in A's CMakeLists.txt : Add_subdirectory(B Path/To/B/Build/Directory) It does build B

Re: [CMake] add_subdirectory and build directory

2009-09-11 Thread Michael Wild
On 11. Sep, 2009, at 15:12, Pierre-Julien Villoud wrote: Hi everyone, After unsuccessfully looking for an answer on Google, I contact you. I have a question regarding the use of add_subdirectory. When a project A is depending on a project B, I add the following in A's CMakeLists.txt :

Re: [CMake] add_subdirectory and build directory

2009-09-11 Thread Marcel Loose
Hi Pierre-Julien, Are you sure it's rebuilding? CMake (or 'make' actually), prints a lot of messages Built target ... even if no compilation was needed. However, if you also see messages like Building ... then it is actually rebuilding. Without an example of the output of your build, it is hard

Re: [CMake] add_subdirectory and build directory

2009-09-11 Thread Bill Hoffman
That's NOT what add_subdirectory is made for. It is intended for adding a sub-directory in the source tree. So, if your directory structure looks like this (i.e. B is a sub-project of A) A/CMakeLists.txt A/B/CMakeLists.txt things are simple: A/CMakeLists.txt: Actually add_subdirectory

Re: [CMake] add_subdirectory and build directory

2009-09-11 Thread Pierre-Julien Villoud
@cmake.org Objet : Re: [CMake] add_subdirectory and build directory Hi Pierre-Julien, Are you sure it's rebuilding? CMake (or 'make' actually), prints a lot of messages Built target ... even if no compilation was needed. However, if you also see messages like Building ... then it is actually rebuilding

Re: [CMake] add_subdirectory and build directory

2009-09-11 Thread Marcel Loose
@cmake.org Objet : Re: [CMake] add_subdirectory and build directory Hi Pierre-Julien, Are you sure it's rebuilding? CMake (or 'make' actually), prints a lot of messages Built target ... even if no compilation was needed. However, if you also see messages like Building ... then it is actually

[CMake] ADD_SUBDIRECTORY and EXCLUDE_FROM_ALL

2008-01-27 Thread DA
Hello, The documentation for ADD_SUBDIRECTORY suggests states the following: If the EXCLUDE_FROM_ALL argument is provided then this subdirectory will not be included in build by default. Users will have to explicitly start a build in the generated output directory. This is useful for having

Re: [CMake] ADD_SUBDIRECTORY

2007-12-20 Thread George Neill
Hi Brandon, Because having a subdirectory doesn't imply that you're going to do anything there. It could just be an intermediate part of your source tree. Perhaps the CMakeLists.txt in that subdirectory merely contains more ADD_SUBDIRECTORY commands. In the example I provided, I tried to

Re: [CMake] ADD_SUBDIRECTORY

2007-12-20 Thread Brandon Van Every
On Dec 20, 2007 11:47 AM, George Neill [EMAIL PROTECTED] wrote: I guess by issuing the ADD_SUBDIRECTORY() ( along with a PROJECT() ) I am implicitly saying there's going to be a collection of stuff built under this project. It makes sense (to me) CMake could automatically generate a

[CMake] ADD_SUBDIRECTORY

2007-12-19 Thread George Neill
Hi CMakers, I have a simple example. I am curious why CMake doesn't automatically build a psuedo-target when an ADD_SUBDIRECTORY is issued? In the end, I want be able to type 'make libs'. I was able to get it to work by adding ADD_CUSTOM_TARGET(libs DEPENDS A B), but adding it seems somewhat

Re: [CMake] ADD_SUBDIRECTORY

2007-12-19 Thread Brandon Van Every
On Dec 19, 2007 4:44 PM, George Neill [EMAIL PROTECTED] wrote: Hi CMakers, I have a simple example. I am curious why CMake doesn't automatically build a psuedo-target when an ADD_SUBDIRECTORY is issued? Because having a subdirectory doesn't imply that you're going to do anything there. It

[CMake] ADD_SUBDIRECTORY() / windows path

2007-10-15 Thread George Neill
Hi, I am relatively new to cmake, thanks for the cool product ... I have have fun using it so far. I have ran in to a problem, on windows xp, with relative out-of-source builds. C:\DOCUME~1\GEORGE~1\Desktopcmake -version cmake version 2.4-patch 7 Here are the commands I have been using to

[CMake] ADD_SUBDIRECTORY not working as expected

2007-09-23 Thread Sebastian Schuberth
Hi, I have a cross-platform library project with multiple test programs that test the library. Those tests come in separate directories, each with it's own CMakeLists.txt file (although the files are all identical, see below). I'm adding the tests to the library project by FILE(GLOB tests

[CMake] ADD_SUBDIRECTORY() and mulitple PROJECT() definitions

2007-05-15 Thread Stephane Rouleau (Consultant)
Hi, We may be using cmake in strange new ways that were not expected (or intended), so if this is not exactly correct let me know and we'll stretch it in another direction... Also this may be a bit confusing, I'm trying to simplify our setup as much as possible for the purpose of this message.

Re: [CMake] ADD_SUBDIRECTORY and EXCLUDE_FROM_ALL

2006-09-07 Thread Brad King
Stephan Tolksdorf wrote: If a subdirectory is included with EXCLUDE_FROM_ALL, targets in the subdirectory are listed in the generated Visual Studio solution, but targets recursively included in subdirectories of the subdirectory are not. Is this a bug or a feature? (I'm using CMake from CVS

[CMake] ADD_SUBDIRECTORY and EXCLUDE_FROM_ALL

2006-09-04 Thread Stephan Tolksdorf
Hi If a subdirectory is included with EXCLUDE_FROM_ALL, targets in the subdirectory are listed in the generated Visual Studio solution, but targets recursively included in subdirectories of the subdirectory are not. Is this a bug or a feature? (I'm using CMake from CVS and VS8.) Regards,

[CMake] ADD_SUBDIRECTORY error

2006-07-28 Thread Xavier Larrode
Hi all, I'm compiling a subDirectory ie : ( ${GVTROOTDIR}/src/test ) with this CMakeList.txt : # get GVTROOT ENV VAR SET(GVTROOTDIR $ENV{GVTROOT}) # keep all *.cpp files FILE(GLOB CPPFILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp) MESSAGE(Fichiers à compiler ${CPPFILES}) #EXE SET(TARGET

Re: [CMake] ADD_SUBDIRECTORY error

2006-07-28 Thread Xavier Larrode
Hi Filipe Filipe Sousa a écrit : And i got a problem with the INCLUDE_DIRECTORIES and this error message : ADD_SUBDIRECTORY A full source directory was specified that is not in the source tree but no binary directory was specified. If you specify an out of tree source directory then you must

Re: [CMake] ADD_SUBDIRECTORY error

2006-07-28 Thread William A. Hoffman
At 08:54 AM 7/28/2006, Xavier Larrode wrote: Hi Filipe Filipe Sousa a écrit : And i got a problem with the INCLUDE_DIRECTORIES and this error message : ADD_SUBDIRECTORY A full source directory was specified that is not in the source tree but no binary directory was specified. If you specify an

Re: [CMake] ADD_SUBDIRECTORY error

2006-07-28 Thread Xavier Larrode
Well you right, it's ok now... Don't know what i changed ;) Last question, is there a way to compile a lib directly on another directory without need a make install to copy it ? William A. Hoffman a écrit : At 08:54 AM 7/28/2006, Xavier Larrode wrote: Hi Filipe Filipe Sousa a écrit :

Re: [CMake] ADD_SUBDIRECTORY error

2006-07-28 Thread Jan Woetzel
Xavier Larrode wrote: But i can do a macro to move them on PATH_FOR_LIB... see LIBRARY_OUTPUT_PATH Jan. -- Dipl.-Ing. Jan Woetzel -- University of Kiel Institute of Computer Science and Applied Mathematics Hermann-Rodewald-Str. 3 [room

Re: [CMake] ADD_SUBDIRECTORY error

2006-07-28 Thread Xavier Larrode
Perfect, thanks Jan Woetzel a écrit : Xavier Larrode wrote: But i can do a macro to move them on PATH_FOR_LIB... see LIBRARY_OUTPUT_PATH Jan. begin:vcard fn;quoted-printable:Xavier Larrod=C3=A9 n;quoted-printable:Larrod=C3=A9;Xavier org:IRISA ;E119 Orange title:Projet GVT tel;work:73 28

[CMake] ADD_SUBDIRECTORY problem

2006-02-17 Thread Prashanth Udupa
Hello All,I have a project in directory XYZ. The directory has thefollowing structureXYZ- include- sources- examples - example_program1 - example_program2 - example_program3 - tools - tool1When I use the following CMakeLists.txt file set on Linux;run cmake and make I notice that it works as

Re: [CMake] ADD_SUBDIRECTORY problem

2006-02-17 Thread William A. Hoffman
What was your active target which you did Build? Make sure it is the ALL_BUILD target. -Bill At 03:21 AM 2/17/2006, Prashanth Udupa wrote: Hello All, I have a project in directory XYZ. The directory has the following structure XYZ - include - sources - examples - example_program1 -

Re: [CMake] ADD_SUBDIRECTORY problem

2006-02-17 Thread Prashanth Udupa
The example programs are mentioned in the .dsw file.And the .dsp files have been created for the exampleprograms. But the example programs dont shown up in theIDE. :( I have attached a copy of the DSW file with this mail. I use Visual Studio 6.0 and CMake 2.2.3On 2/17/06, William A. Hoffman [EMAIL

Re: [CMake] ADD_SUBDIRECTORY problem

2006-02-17 Thread William A. Hoffman
Can you load the .dsp files for the examples directly? Are there any errors at load time? -Bill At 09:25 AM 2/17/2006, Prashanth Udupa wrote: The example programs are mentioned in the .dsw file. And the .dsp files have been created for the example programs. But the example programs dont shown