Re: [CMake] add_subdirectory and build directory

2009-09-15 Thread Marcel Loose
11 septembre 2009 16:30 À : Pierre-Julien Villoud Cc : cmake@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

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