[amarok] cmake/modules: Revert "FindMySQLAmarok.cmake fix argumets when calling mysql_config"

Christophe Giboudeaux cgiboudeaux at gmx.com
Sun Dec 18 23:08:33 UTC 2011


On Sunday 18 December 2011 23:27:08 =?utf-8?B?TWF0xJtq?= Laitl wrote:
> On 18. 12. 2011 Christophe Giboudeaux wrote:
> > Revert "FindMySQLAmarok.cmake fix argumets when calling mysql_config"
> > This reverts a fix for -Wmissing-include-dirs warnings.
> > MYSQL_INCLUDE_DIR must be a path and not contain -I<path>
> 
> Sorry about the incorrect fix, I will build with -Wmissing-include-dirs from
> now on. However I wonder how to fix the original problem.

Your commit doesn't mention the issue you're trying to fix. However, having 
the same directory included several times is not an issue (and I'm not aware 
of any GCC flag that would throw a warning).

> 
> Would it be legal to remove MYSQL_INCLUDE_DIR entirely and just rely on
> MYSQL_CFLAGS to specify -I/path/to/mysql ?
> 

Well, they don't have the same purpose. MYSQL_CFLAGS is used by the compiler 
(used in 'add_definitions..' lines) while MYSQL_INCLUDE_DIR is used by cmake.

Also, if mysql_config is not available, MYSQL_CFLAGS is empty and you can only 
count on MYSQL_INCLUDE_DIR.

> E.g. is cmake's include_directories(/dir) just a syntactic sugar for
> add_definitions(-I/dir) or it would break build on non-gcc platforms? I'd
> rather avoid filtering "-I" out of MYSQL_INCLUDE_DIR in CMakeLists.
> 

Without hint about what you're trying to fix, it's hard to answer this 
question.


Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/amarok-devel/attachments/20111219/d6a46200/attachment.sig>


More information about the Amarok-devel mailing list