config.h (Re: kde unittests integrated in cmake buildsystem)

Alexander Neundorf neundorf at
Tue Feb 14 23:05:20 CET 2006

On Tuesday 14 February 2006 22:34, David Faure wrote:
> On Tuesday 14 February 2006 18:23, William A. Hoffman wrote:
> > This seems like a bug, that can be fixed.  My guess is that the config.h
> > file is somehow being changed.
> Will cmake allow to split config.h into multiple files? 

Yes, you can put configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config-foo.h.cmake 
${CMAKE_CURRENT_BINARY_DIR}/config-foo.h) in any CMakeLists.txt in any 
directory, accompanied by the appropriate check_something() calls and it will 
generate the header there.
This requires changing the sources which use this config header, that's why I 
didn't do it yet.
And it probably requires very careful moving of the tests from the global 
config.h to local config-*.h's, I think for each check it has to be checked 
where the results are used. Changing config.h is very time-consuming...
(the extension ".cmake" isn't required at all, it can be chosen arbitrary).

Work: alexander.neundorf AT -
Home: neundorf AT                -
      alex AT               -

More information about the Kde-buildsystem mailing list