Re: [CMake] Determine which files have changed during a CMake run

2016-11-23 Thread Michael Jackson
Thanks! This worked for my needs. Ninja said my command line changed. So 
I used the generated compile_commands.json before and after a cmake run, 
diff'ed those two files and was able to zero in on the issue. Thanks for 
the tip. Worked great. Have to store that one away for future use.


--
Mike Jackson  [mike.jack...@bluequartz.net]


Craig Scott wrote:

Does "ninja -d explain" tell you what you need?

On Thu, Nov 24, 2016 at 5:34 AM, Michael Jackson
mailto:mike.jack...@bluequartz.net>> wrote:

Is there a way to determine which files in my build directory have
changed for a given run of CMake? The use case is that I made what I
thought was a small change to my configuration using cmake and when
I went to build it was basically a full recompile. During our cmake
run we do use configure_file(...) to generate headers and sources
some of which basically get included in every source file. I am
thinking that I have a dependency on generating those files when I
probably do not have to.

I use Ninja as my build system if that helps. I could always just
hack a local git repo for the build folder, commit everything, run
cmake and see what got changed. Anybody have a better idea?

Thanks

--
Mike Jackson  [mike.jack...@bluequartz.net
]
--

Powered by www.kitware.com 

Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ


Kitware offers various services to support the CMake community. For
more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html

CMake Consulting: http://cmake.org/cmake/help/consulting.html

CMake Training Courses: http://cmake.org/cmake/help/training.html


Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html


Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake





--
Craig Scott
Melbourne, Australia
https://crascit.com

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] Determine which files have changed during a CMake run

2016-11-23 Thread David Cole via CMake
Using git like that is actually the perfect way to do it if you just want
to analyze it manually. I've actually done that with other projects source
trees when something seems to appear there even when doing an out of source
build... It's a great way to see what's changed (and how) easily.

You could also write a CMake script that iterates files in the build
directory, and uses IS_NEWER in conjunction with a reference file touched
just prior to running CMake if you need to generate a report like this
frequently for some reason.

HTH,
David C.


On Wednesday, November 23, 2016, Michael Jackson <
mike.jack...@bluequartz.net> wrote:

> Is there a way to determine which files in my build directory have changed
> for a given run of CMake? The use case is that I made what I thought was a
> small change to my configuration using cmake and when I went to build it
> was basically a full recompile. During our cmake run we do use
> configure_file(...) to generate headers and sources some of which basically
> get included in every source file. I am thinking that I have a dependency
> on generating those files when I probably do not have to.
>
> I use Ninja as my build system if that helps. I could always just hack a
> local git repo for the build folder, commit everything, run cmake and see
> what got changed. Anybody have a better idea?
>
> Thanks
>
> --
> Mike Jackson  [mike.jack...@bluequartz.net]
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensou
> rce/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
>
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] Determine which files have changed during a CMake run

2016-11-23 Thread Craig Scott
Does "ninja -d explain" tell you what you need?

On Thu, Nov 24, 2016 at 5:34 AM, Michael Jackson <
mike.jack...@bluequartz.net> wrote:

> Is there a way to determine which files in my build directory have changed
> for a given run of CMake? The use case is that I made what I thought was a
> small change to my configuration using cmake and when I went to build it
> was basically a full recompile. During our cmake run we do use
> configure_file(...) to generate headers and sources some of which basically
> get included in every source file. I am thinking that I have a dependency
> on generating those files when I probably do not have to.
>
> I use Ninja as my build system if that helps. I could always just hack a
> local git repo for the build folder, commit everything, run cmake and see
> what got changed. Anybody have a better idea?
>
> Thanks
>
> --
> Mike Jackson  [mike.jack...@bluequartz.net]
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensou
> rce/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
>



-- 
Craig Scott
Melbourne, Australia
https://crascit.com
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

[CMake] Determine which files have changed during a CMake run

2016-11-23 Thread Michael Jackson
Is there a way to determine which files in my build directory have 
changed for a given run of CMake? The use case is that I made what I 
thought was a small change to my configuration using cmake and when I 
went to build it was basically a full recompile. During our cmake run we 
do use configure_file(...) to generate headers and sources some of which 
basically get included in every source file. I am thinking that I have a 
dependency on generating those files when I probably do not have to.


I use Ninja as my build system if that helps. I could always just hack a 
local git repo for the build folder, commit everything, run cmake and 
see what got changed. Anybody have a better idea?


Thanks

--
Mike Jackson  [mike.jack...@bluequartz.net]
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake