Re: Missing configure checks for #cmakedefine
On Monday 23 March 2009, Lubos Lunak wrote: > On Saturday 21 of March 2009, Allen Winter wrote: > > I think someone needs to write a new tool that scans the source for all > > the conditional compile defines, then compares that list against the list > > of all the defines we might set (in ConfigureChecks.cmake). > > > > This seems more like a code-quality thing than a buildsystem-thing. > > It looks to me like a buildsystem thing, the buildsystem should know > whether there has been a test for such a flag, since, well, it should know. > Or at least it could know. > > > Hmm.. Krazy could do this, if it was given a list of all known HAVE_FOO > > macros. Of course, people would also need to care about looking at/fixing > > Krazy issues on a regular basis. > > I suppose this could be good enough if CMake can't handle this itself. The code which handles #cmakedefine could test whether the variable is actually defined (as opposed to FALSE or OFF), and if not issue a warning. Please submit a feature request in the cmake bug tracker. Alex ___ Kde-buildsystem mailing list Kde-buildsystem@kde.org https://mail.kde.org/mailman/listinfo/kde-buildsystem
Re: Missing configure checks for #cmakedefine
On Saturday 21 of March 2009, Allen Winter wrote: > I think someone needs to write a new tool that scans the source for all > the conditional compile defines, then compares that list against the list > of all the defines we might set (in ConfigureChecks.cmake). > > This seems more like a code-quality thing than a buildsystem-thing. It looks to me like a buildsystem thing, the buildsystem should know whether there has been a test for such a flag, since, well, it should know. Or at least it could know. > Hmm.. Krazy could do this, if it was given a list of all known HAVE_FOO > macros. Of course, people would also need to care about looking at/fixing > Krazy issues on a regular basis. I suppose this could be good enough if CMake can't handle this itself. -- Lubos Lunak KDE developer -- SUSE LINUX, s.r.o. e-mail: l.lu...@suse.cz , l.lu...@kde.org Lihovarska 1060/12 tel: +420 284 028 972 190 00 Prague 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz ___ Kde-buildsystem mailing list Kde-buildsystem@kde.org https://mail.kde.org/mailman/listinfo/kde-buildsystem
Re: Missing configure checks for #cmakedefine
On Saturday 21 March 2009 8:25:21 am Allen Winter wrote: > On Friday 20 March 2009 7:32:12 pm Lubos Lunak wrote: > > On Friday 20 of March 2009 23:21:48 Thiago Macieira wrote: > > > Lubos Lunak wrote: > > > >At least looking at generated > > > >kdebase/workspace/config-workspace.h it has a couple of #undef's for > > > > things that obviously are present (e.g. unistd.h). > > > > > > unistd.h is not present on Windows (it's not a Unix system). But workspace > > > is not meant to compile on Windows anyways... > > > > I think you misunderstood my point. I am pretty sure there is unistd.h on > > my > > machine. Just like there is setpriority(), yet the code requiring it wasn't > > compiled. > > > > I think someone needs to write a new tool that scans the source for all > the conditional compile defines, then compares that list against the list > of all the defines we might set (in ConfigureChecks.cmake). > > This seems more like a code-quality thing than a buildsystem-thing. > > Hmm.. Krazy could do this, if it was given a list of all known HAVE_FOO > macros. > Of course, people would also need to care about looking at/fixing Krazy > issues on a regular basis. > > I will do a Krazy check, if people want me to do that. > Done. Will be in place for tonight's run on the EBN. -- Allen Winter | Software Engineer | 1-888-872-9339 KDAB, Inc. | "Platform-independent software solutions" http://kdab.com | 1-866-777-5322 (US) | +46-563-540090 (Sweden) ___ Kde-buildsystem mailing list Kde-buildsystem@kde.org https://mail.kde.org/mailman/listinfo/kde-buildsystem
Re: Missing configure checks for #cmakedefine
On Friday 20 March 2009 7:32:12 pm Lubos Lunak wrote: > On Friday 20 of March 2009 23:21:48 Thiago Macieira wrote: > > Lubos Lunak wrote: > > >At least looking at generated > > >kdebase/workspace/config-workspace.h it has a couple of #undef's for > > > things that obviously are present (e.g. unistd.h). > > > > unistd.h is not present on Windows (it's not a Unix system). But workspace > > is not meant to compile on Windows anyways... > > I think you misunderstood my point. I am pretty sure there is unistd.h on my > machine. Just like there is setpriority(), yet the code requiring it wasn't > compiled. > I think someone needs to write a new tool that scans the source for all the conditional compile defines, then compares that list against the list of all the defines we might set (in ConfigureChecks.cmake). This seems more like a code-quality thing than a buildsystem-thing. Hmm.. Krazy could do this, if it was given a list of all known HAVE_FOO macros. Of course, people would also need to care about looking at/fixing Krazy issues on a regular basis. I will do a Krazy check, if people want me to do that. -Allen -- Allen Winter | Software Engineer | 1-888-872-9339 KDAB, Inc. | "Platform-independent software solutions" http://kdab.com | 1-866-777-5322 (US) | +46-563-540090 (Sweden) ___ Kde-buildsystem mailing list Kde-buildsystem@kde.org https://mail.kde.org/mailman/listinfo/kde-buildsystem
Re: Missing configure checks for #cmakedefine
On Friday 20 of March 2009 23:21:48 Thiago Macieira wrote: > Lubos Lunak wrote: > >At least looking at generated > >kdebase/workspace/config-workspace.h it has a couple of #undef's for > > things that obviously are present (e.g. unistd.h). > > unistd.h is not present on Windows (it's not a Unix system). But workspace > is not meant to compile on Windows anyways... I think you misunderstood my point. I am pretty sure there is unistd.h on my machine. Just like there is setpriority(), yet the code requiring it wasn't compiled. -- Lubos Lunak KDE developer -- SUSE LINUX, s.r.o. e-mail: l.lu...@suse.cz , l.lu...@kde.org Lihovarska 1060/12 tel: +420 284 028 972 190 00 Prague 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz ___ Kde-buildsystem mailing list Kde-buildsystem@kde.org https://mail.kde.org/mailman/listinfo/kde-buildsystem
Re: Missing configure checks for #cmakedefine
Thiago Macieira schrieb: > Lubos Lunak wrote: >> At least looking at generated >> kdebase/workspace/config-workspace.h it has a couple of #undef's for >> things that obviously are present (e.g. unistd.h). > > unistd.h is not present on Windows (it's not a Unix system). But workspace > is not meant to compile on Windows anyways... > :) Workspace does compile on windows due to the work of Saro and Brandon (afaik plasma.exe also works - at least it starts). Christian ___ Kde-buildsystem mailing list Kde-buildsystem@kde.org https://mail.kde.org/mailman/listinfo/kde-buildsystem
Re: Missing configure checks for #cmakedefine
Lubos Lunak wrote: >At least looking at generated >kdebase/workspace/config-workspace.h it has a couple of #undef's for > things that obviously are present (e.g. unistd.h). unistd.h is not present on Windows (it's not a Unix system). But workspace is not meant to compile on Windows anyways... -- Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org PGP/GPG: 0x6EF45358; fingerprint: E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358 signature.asc Description: This is a digitally signed message part. ___ Kde-buildsystem mailing list Kde-buildsystem@kde.org https://mail.kde.org/mailman/listinfo/kde-buildsystem