Re: [CMake] [cmake-developers] Obtaining header file dependencies of a source file manually

2015-12-01 Thread Dan Liew
>> There is an alternative which I suggested in the post. Have CMake >> determine the dependencies of the files passed to ``IMPLICIT_DEPENDS`` >> at configure time and spit that into the build files of the generator >> (that would work for any generator). Then have any changes made to the >> files

Re: [CMake] [cmake-developers] Obtaining header file dependencies of a source file manually

2015-12-01 Thread Dan Liew
> I fail to see why that should not work. Producing LLVM bitcode from > C++ with Clang is just adding -emit-llvm flag, right? So, why can't > the SuperBuild configure the child build to use Clang and this flag? > And Bob's your uncle... Hmm, to be honest I hadn't tried. It works better than

Re: [CMake] [cmake-developers] Obtaining header file dependencies of a source file manually

2015-12-01 Thread Brad King
On 12/01/2015 02:41 PM, Dan Liew wrote: >> Perhaps, but after regenerating the project the build tool will not >> re-load the build files and start building again. That will take >> an additional invocation. The number of iterations required is >> bounded only by the depth of dependency chains.

Re: [CMake] [cmake-developers] Obtaining header file dependencies of a source file manually

2015-11-30 Thread Brad King
On 11/30/2015 01:56 PM, Dan Liew wrote: > It doesn't look completely impossible. For Ninja, it looks like it has > some support for compiler generated dependency files [2] Yes, it may be possible for Ninja. > There is an alternative which I suggested in the post. Have CMake > determine the

Re: [CMake] [cmake-developers] Obtaining header file dependencies of a source file manually

2015-11-30 Thread Dan Liew
On 30 November 2015 at 18:35, Brad King wrote: > On 11/30/2015 01:32 PM, Dan Liew wrote: >> It works but only for makefile generators... That's an annoying >> limitation. I'll file a feature request to get this implemented for >> other generators. > > It happens to work for

Re: [CMake] [cmake-developers] Obtaining header file dependencies of a source file manually

2015-11-30 Thread Dan Liew
> For other generators that are Makefile or Ninja based I guess that > approach wouldn't work. Sorry that should read For other generators that **aren't** Makefile or Ninja based I guess that approach wouldn't work. -- Powered by www.kitware.com Please keep messages on-topic and check the

Re: [CMake] [cmake-developers] Obtaining header file dependencies of a source file manually

2015-11-30 Thread Dan Liew
Hi Michael, > Not going into detail as I'm typing on the phone, but this really sounds > like a case where a "SuperBuild" > (http://www.kitware.com/media/html/BuildingExternalProjectsWithCMake2.8.html) > can help you to simplify things a lot. Thanks for the suggestion but this certainly is not a

Re: [CMake] [cmake-developers] Obtaining header file dependencies of a source file manually

2015-11-30 Thread Brad King
On 11/30/2015 01:32 PM, Dan Liew wrote: > It works but only for makefile generators... That's an annoying > limitation. I'll file a feature request to get this implemented for > other generators. It happens to work for Makefile generators because it was easy to implement since those generators

Re: [CMake] [cmake-developers] Obtaining header file dependencies of a source file manually

2015-11-30 Thread Dan Liew
Hi, On 30 November 2015 at 08:09, Petr Kmoch wrote: > Hi Dan, > > you could look into the IMPLICIT_DEPENDS argument of add_custom_command: > https://cmake.org/cmake/help/latest/command/add_custom_command.html > > I don't have direct experience with it, but it looks like it

Re: [CMake] [cmake-developers] Obtaining header file dependencies of a source file manually

2015-11-30 Thread Michael Wild
On Mon, Nov 30, 2015 at 7:01 PM, Dan Liew wrote: > Hi Michael, > >> Not going into detail as I'm typing on the phone, but this really sounds >> like a case where a "SuperBuild" >> (http://www.kitware.com/media/html/BuildingExternalProjectsWithCMake2.8.html) >> can help you to

Re: [CMake] [cmake-developers] Obtaining header file dependencies of a source file manually

2015-11-30 Thread Petr Kmoch
Hi Dan, you could look into the IMPLICIT_DEPENDS argument of add_custom_command: https://cmake.org/cmake/help/latest/command/add_custom_command.html I don't have direct experience with it, but it looks like it could do what you're looking for. Petr On Sun, Nov 29, 2015 at 10:47 AM, Dan Liew

Re: [CMake] [cmake-developers] Obtaining header file dependencies of a source file manually

2015-11-30 Thread iosif neitzke
What does output_required_files() [0] do, and is it applicable here? [0] https://cmake.org/cmake/help/v3.4/command/output_required_files.html On Mon, Nov 30, 2015 at 2:09 AM, Petr Kmoch wrote: > Hi Dan, > > you could look into the IMPLICIT_DEPENDS argument of

Re: [CMake] [cmake-developers] Obtaining header file dependencies of a source file manually

2015-11-30 Thread Petr Kmoch
On Mon, Nov 30, 2015 at 2:04 PM, iosif neitzke < iosif.neitzke+cm...@gmail.com> wrote: > What does output_required_files() [0] do, and is it applicable here? > > [0] https://cmake.org/cmake/help/v3.4/command/output_required_files.html First and foremost, it introduces deprecated behaviour into

Re: [CMake] [cmake-developers] Obtaining header file dependencies of a source file manually

2015-11-29 Thread Michael Wild
On Sun, Nov 29, 2015, 10:47 Dan Liew wrote: Hi, # TL;DR I need a way of determining the header file dependencies of a source file and inform CMake about them. CMake doesn't do this automatically because I'm using custom commands for the compilation step so CMake doesn't do