Re: [CMake] add_subdirectory and build directory

2009-09-11 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 simple:

Re: [CMake] Make project name a target

2009-09-11 Thread Marcel Loose
Hi JeDi, If you look carefully, you will notice that, when you create a project through a macro (e.g. myproject), CMake will create a dummy project named "Project" and assume you're using C and C++ as default languages. Note that I intentionally chose a non-supported language, CPP, in the example

[CMake] Eclipse CDT4 generator - No source files

2009-09-11 Thread Dixon, Shane
I'm generating an eclipse project and whenever I import the project, all the files are there except for the source and header files. I had a similar problem when generating "Visual Studio 9 2008" projects ( I was missing the header files). I fixed that by adding all the .h files to my project_

Re: [CMake] Only install file if it does not exist?

2009-09-11 Thread Eric Noulard
2009/9/11 Bob Tanner : > On 2009-09-10 01:12:43 -0500, Eric Noulard said: > >> 0)  Write your parameterized  CMake script CopyIfNotExists.cmake.in >> >> 1)  CONFIGURE_FILE(CopyIfNotExists.cmake.in CopyIfNotExists.cmake) >>     This step will replace appropriate vars in CopyIfNotExists.cmake.in >>

Re: [CMake] linking error after upgrading to snow leopard

2009-09-11 Thread Michael Jackson
You are not specifying the libraries that contain those symbols. Looking at your link line you are missing at least the Qt libraries/ Frameworks and maybe some others. If the arch were incorrect the linker would explicitly tell you that the libraries you are trying to link against is the wro

Re: [CMake] Only install file if it does not exist?

2009-09-11 Thread Bob Tanner
On 2009-09-10 01:12:43 -0500, Eric Noulard said: 0) Write your parameterized CMake script CopyIfNotExists.cmake.in 1) CONFIGURE_FILE(CopyIfNotExists.cmake.in CopyIfNotExists.cmake) This step will replace appropriate vars in CopyIfNotExists.cmake.in with value coming from your cur

Re: [CMake] linking error after upgrading to snow leopard

2009-09-11 Thread S Roderick
On Sep 11, 2009, at 14:27 , Sean McBride wrote: On 9/11/09 4:24 PM, Boudewijn Rempt said: I'm getting weird linking errors after I upgraded to Snow Leopard. I'm using the CVS version of cmake. If I have the MACOSX_BUNDLE flag in ADD_EXECUTABLE, there are lots of weird visiblity errors like

Re: [CMake] linking error after upgrading to snow leopard

2009-09-11 Thread James C. Sutherland
On Sep 11, 2009, at 12:16 PM, Boudewijn Rempt wrote: On Friday 11 September 2009, James C. Sutherland wrote: On Sep 11, 2009, at 8:24 AM, Boudewijn Rempt wrote: I'm getting weird linking errors after I upgraded to Snow Leopard. This is probably because the library you are linking to is 32-b

Re: [CMake] linking error after upgrading to snow leopard

2009-09-11 Thread Sean McBride
On 9/11/09 4:24 PM, Boudewijn Rempt said: >I'm getting weird linking errors after I upgraded to Snow Leopard. I'm using >the CVS version of cmake. If I have the MACOSX_BUNDLE flag in ADD_EXECUTABLE, >there are lots of weird visiblity errors like: >nking CXX executable HyvesDesktop.app/Contents/Mac

Re: [CMake] linking error after upgrading to snow leopard

2009-09-11 Thread Boudewijn Rempt
On Friday 11 September 2009, James C. Sutherland wrote: > On Sep 11, 2009, at 8:24 AM, Boudewijn Rempt wrote: > > I'm getting weird linking errors after I upgraded to Snow Leopard. > > This is probably because the library you are linking to is 32-bit and > Snow Leopard's development environment wi

Re: [CMake] Make project name a target

2009-09-11 Thread Alexander Neundorf
On Friday 11 September 2009, David Cole wrote: > When you say "make the project name a target" what do you mean by that? > (1) internally create a CMake target with the given name? > (2) create a makefile target with that name that builds all the cmake > targets in that cmake project? I think this

Re: [CMake] add_subdirectory and build directory

2009-09-11 Thread Marcel Loose
Hi Pierre-Julien, I think I see what the problem is. You didn't specify any dependencies. You mention that project A depends on B. But don't you actually mean that libA depends on libB? If that's the case you should add a target_link_libraries(libA libB) to the CMakeLists.txt file of project A. A

Re: [CMake] linking error after upgrading to snow leopard

2009-09-11 Thread James C. Sutherland
On Sep 11, 2009, at 8:24 AM, Boudewijn Rempt wrote: I'm getting weird linking errors after I upgraded to Snow Leopard. This is probably because the library you are linking to is 32-bit and Snow Leopard's development environment will produce 64-bit binaries. Try recompiling the library/libr

Re: [CMake] add_subdirectory and build directory

2009-09-11 Thread Pierre-Julien Villoud
Hi and thanks for your answer... Here is the ouput : I'm building A : My CMakelists.txt is in C:/A -- Configuring done -- Generating done -- Build files have been written to: C:/A/Debug ==Building A== [ 0%] Built target CMake Scanning dependencies of target B [ 4%] Bui

[CMake] Option dependencies

2009-09-11 Thread Jeroen Dierckx
Hi, We have a rather complex framework that we are converting to cmake. I want to present the user with options to build some parts of our framework or not. A lot of these options depend on others (when building the Ogre rendering modules for example, our engine needs to be built too). I know I ca

[CMake] linking error after upgrading to snow leopard

2009-09-11 Thread Boudewijn Rempt
Hi, I'm getting weird linking errors after I upgraded to Snow Leopard. I'm using the CVS version of cmake. If I have the MACOSX_BUNDLE flag in ADD_EXECUTABLE, there are lots of weird visiblity errors like: nking CXX executable HyvesDesktop.app/Contents/MacOS/HyvesDesktop /usr/local/bin/cmake -E cm

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 d

Re: [CMake] Make project name a target

2009-09-11 Thread Jeroen Dierckx
On Fri, Sep 11, 2009 at 4:22 PM, Marcel Loose wrote: > Hi David, > > I don't see the exact difference between (1) and (2). And yes, I was > thinking of using the project name as a target. You are right, that it > might cause clashes with existing projects, though :-( > > We use the convention that

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 ha

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 : Ad

Re: [CMake] Make project name a target

2009-09-11 Thread Marcel Loose
Hi David, I don't see the exact difference between (1) and (2). And yes, I was thinking of using the project name as a target. You are right, that it might cause clashes with existing projects, though :-( We use the convention that project names are always capitalized, so we usually don't run int

[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 befo

Re: [CMake] Make project name a target

2009-09-11 Thread David Cole
When you say "make the project name a target" what do you mean by that? (1) internally create a CMake target with the given name? (2) create a makefile target with that name that builds all the cmake targets in that cmake project? (3) something else? (1) is probably not feasible for most folks --

[CMake] Make project name a target

2009-09-11 Thread Marcel Loose
Hi all, I was wondering whether it's a good idea to make the project name (i.e. the argument to the 'project' command) a target. Rationale: I have a project that consists of numerous sub-projects and I would like to be able to build some of these separately. Wrapping the 'project' command in a m