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

Alexander Neundorf neundorf at kde.org
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).

Bye
Alex
-- 
Work: alexander.neundorf AT jenoptik.com - http://www.jenoptik-los.de
Home: neundorf AT kde.org                - http://www.kde.org
      alex AT neundorf.net               - http://www.neundorf.net


More information about the Kde-buildsystem mailing list