Re: [CMake] Deriving version number from a header (safely)

2009-05-14 Thread Doug Gregor
On Thu, May 14, 2009 at 8:25 AM, Brad King wrote: > Doug Gregor wrote: >> >> However, we'd also like to force CMake to reconfigure when >> boost/version.hpp changes. Is there some top-level target that we can >> attach such a dependency to? > > This has come up several times recently.  We need to

Re: [CMake] Deriving version number from a header (safely)

2009-05-14 Thread Brad King
Doug Gregor wrote: However, we'd also like to force CMake to reconfigure when boost/version.hpp changes. Is there some top-level target that we can attach such a dependency to? This has come up several times recently. We need to add a feature to let projects specify their own files on which th

[CMake] Deriving version number from a header (safely)

2009-05-14 Thread Doug Gregor
Hello, I'm hacking on a CMake build system for Boost, and we'd like to extract the Boost version number from our version header (boost/version.hpp) so that we can use the version number within CMake. Actually doing this is trivial: file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/boost/version.hpp BOOST_