KDE/kdelibs

Alexander Neundorf neundorf at kde.org
Mon Feb 22 19:50:54 CET 2010


On Monday 22 February 2010, Harald Fernengel wrote:
> Hi Alex,
>
> thank you for your comments. I wasn't aware of the extra tools target, will
> try to figure out how to use. Next patch goes up to review board for your
> reviewing pleasure :)

Waiting for that :-)

> [snip FindKDE4Internal.cmake]
>
> > Why do you need the NOT CMAKE_CROSSCOMPILING here ?
> > I think there must be some actual condition which should be tested
> > against.
>
> When cross-compiling, you can't run the executable that's being generated,
> so I skip that test. 

Now that I look at it, does this actually have to be a try_run(), and wouldn't 
a try_compile(), or better a check_cxx_source_compiles() be sufficient ?

The code in question is this:

#include <QtCore/QtGlobal>

int main()
{
#ifdef QT_VISIBILITY_AVAILABLE 
   return 0;
#else
  return 1;
#endif
}


Wouldn't a 
#include <QtCore/QtGlobal>

int main()
{
#ifdef QT_VISIBILITY_AVAILABLE 
   return 0;
#else
  Error: QT_VISIBILITY_AVAILABLE not defined !
#endif
}

also do the same job ?

Alex


More information about the Kde-buildsystem mailing list