Re: [CMake] Top level target depending on a file

2011-12-14 Thread Alexander Broekhuis
Hi, CMake takes great care regarding dependencies on files which are needed to build targets, i.e. usually, it's not necessary to specify any extra dependencies of a target on a file. In my exemplary project, the README file is actually not needed to build the library target, so CMake does

Re: [CMake] Top level target depending on a file

2011-12-14 Thread Eric Noulard
2011/12/14 Alexander Broekhuis a.broekh...@gmail.com: Hi, CMake takes great care regarding dependencies on files which are needed to build targets, i.e. usually, it's not necessary to specify any extra dependencies of a target on a file. In my exemplary project, the README file is actually

Re: [CMake] Top level target depending on a file

2011-12-14 Thread Alexander Broekhuis
Hi, Thanks for you replies, In my case the output is the ZIP file. So the zip file is produced by the top level target, and I don't want/need a separate target for it. Yes but CMake's jobs is to build libraries and executables not bundle which is more the CPack's job, however I

Re: [CMake] Top level target depending on a file

2011-12-14 Thread Michael Hertling
On 12/14/2011 09:30 AM, Alexander Broekhuis wrote: Hi, CMake takes great care regarding dependencies on files which are needed to build targets, i.e. usually, it's not necessary to specify any extra dependencies of a target on a file. In my exemplary project, the README file is actually

Re: [CMake] Top level target depending on a file

2011-12-14 Thread Alexander Broekhuis
Hi, First of all, you definitely need the library target in order to build the library, and CMake ignores each file in the list of sources which is not necessary for this purpose. IMO, that's quite reasonable; e.g., you wouldn't want to have the library relinked or even completely re-

Re: [CMake] Top level target depending on a file

2011-12-14 Thread Eric Noulard
2011/12/14 Alexander Broekhuis a.broekh...@gmail.com: Hi, Thanks for you replies, Yes but CMake's jobs is to build libraries and executables not bundle which is more the CPack's job, however I understand your point. An extra target may be a small price to pay, no? Well I'd rather have

Re: [CMake] Top level target depending on a file

2011-12-14 Thread Michael Hertling
On 12/14/2011 10:55 AM, Alexander Broekhuis wrote: Hi, Thanks for you replies, In my case the output is the ZIP file. So the zip file is produced by the top level target, and I don't want/need a separate target for it. Yes but CMake's jobs is to build libraries and executables not

Re: [CMake] Top level target depending on a file

2011-12-14 Thread Alexander Broekhuis
Yes now it's clear. You are looking for something like add_library like command which would produce the OSGi bundle which is the purpose of your bundle macro. Yes this is exactly what I'd like to do, but taking Michael remarks into account, I now think it would make more sense to have the

Re: [CMake] Top level target depending on a file

2011-12-14 Thread Michael Hertling
On 12/14/2011 11:23 AM, Alexander Broekhuis wrote: Hi, First of all, you definitely need the library target in order to build the library, and CMake ignores each file in the list of sources which is not necessary for this purpose. IMO, that's quite reasonable; e.g., you wouldn't want to

Re: [CMake] Top level target depending on a file

2011-12-13 Thread Alexander Broekhuis
Hi, The only issue would be that you have to call (i.e. build) the new custom target explicitely instead of relying on POST BUILD. I had hoped it would be as simple as adding a DEPENDS to the custom target, or something similar. Note that may be I didn't catch your usage so may be you can

Re: [CMake] Top level target depending on a file

2011-12-13 Thread Michael Hertling
On 12/12/2011 11:40 AM, Alexander Broekhuis wrote: Hi, Can anyone help me with this? I haven't found a proper solution myself yet.. Does the following examplary project do what you intend? CMAKE_MINIMUM_REQUIRED(VERSION 2.8 FATAL_ERROR) PROJECT(P C) SET(CMAKE_VERBOSE_MAKEFILE ON) # The

Re: [CMake] Top level target depending on a file

2011-12-13 Thread Michael Hertling
On 12/13/2011 03:24 PM, Alexander Broekhuis wrote: Hi, Thanks for the hint, I haven't tried it yet, but looks good at the first glance! I'll try this. Is this worth a feature request? To be able to add a file as a dependency to a target would make sense to me.. The posted issue (

Re: [CMake] Top level target depending on a file

2011-12-12 Thread Alexander Broekhuis
Hi, Can anyone help me with this? I haven't found a proper solution myself yet.. 2011/12/8 Alexander Broekhuis a.broekh...@gmail.com Hi all, In my project, some top level targets depend on simple text files. These targets produce a zip file as output, this is done using a custom command

Re: [CMake] Top level target depending on a file

2011-12-12 Thread Eric Noulard
2011/12/12 Alexander Broekhuis a.broekh...@gmail.com: Hi, Can anyone help me with this? I haven't found a proper solution myself yet.. The fact is there is no builtin support for what you ask see: http://public.kitware.com/Bug/view.php?id=8438 But the thing is. Why don't you create a top

[CMake] Top level target depending on a file

2011-12-08 Thread Alexander Broekhuis
Hi all, In my project, some top level targets depend on simple text files. These targets produce a zip file as output, this is done using a custom command with a post-build to a library target. Part of the zip file are some simple text files, which are included using some custom CPack handling