On sexta-feira, 1 de março de 2013 23.11.53, Ivan Čukić wrote: > > Why do you need that? Are you adding source files conditionally, depending > > on whether the compiler supports certain features? > > Yes, as I said, the library builds with any C++ compiler, but the service > requires at least gcc 4.5 equivalent feature set. > > The service can not use #error since that would mean that the whole build > failed even if the library is compilable and /usable/ without it. > > > #ifdef and make dummies of what doesn't work. > > Making dummies for everything is definitely not the solution that I'd > consider cleaner than having the cmake tests.
The solution is to have missing services then? Anyway, if you need cmake-time decisions, you should compile a simple C++ test that checks the Qt macro. You can also process the output of: gcc -std=c++11 -fPIE -E -dM -I$QTDIR/include -include QtCore/qglobal.h -xc++ /dev/null | grep Q_COMPILER That will give you the full listing of detected features, matching exactly what will be available at compile-time. -- Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org Software Architect - Intel Open Source Technology Center PGP/GPG: 0x6EF45358; fingerprint: E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
signature.asc
Description: This is a digitally signed message part.