On Wednesday 03 May 2006 16:09, David Faure wrote: > On Wednesday 03 May 2006 15:32, Ralf Habacker wrote: > > #cmakedefine HAVE_PCREPOSIX 1 > > > > The problem is that if someone forgets to add this constants the > > resulting errors are hards to detect. > > We could fix this by using #if HAVE_FOO and #if !HAVE_FOO instead of ifdef, > then we would have compiler warnings when HAVE_FOO isn't defined (due to > forgetting to add it to config-foo.h, or due to forgetting to include > config-foo.h in the cpp file). > > But for this we need a #cmakedefine equivalent that sets 0 or 1, instead of > "undef or 1". Could this be done?
in the CMakeLists.txt: macro_bool_to_01(SOMETHING_FOUND HAVE_SOMETHING) (feel free to suggest a better name for this one, it works also for multiple "output" variables)) in the .h.cmake: #define HAVE_SOMETHING ${HAVE_SOMETHING} ) 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 _______________________________________________ Kde-buildsystem mailing list Kde-buildsystem@kde.org https://mail.kde.org/mailman/listinfo/kde-buildsystem