soprano cmake patch - making backends optional

Maciej Mrozowski reavertm at poczta.fm
Thu Jan 29 10:20:27 CET 2009


This is a bit better one, tell me what do you think.

Unfortunately I cannot use macro_optional_find_package() everywhere as it 
creates variable with name ENABLE_${pkgname} where pkgname is cmake 
Find${pkgname} module name, and in case of Sesame2 it would be WITH_JNI - 
pretty much non-informative.
So, as summary is already displayed, I decided to just add option() and not 
make use of macro_optional_find_package and macro_log_feature.
Besides macro_optional_find_package adds variable with WITH_ prefix (and when 
I cannot use it in sesame, it would result in WITH_Redland, ENABLE_Sesam2 - 
and both are storage backends - it would be bad).
Besides I added ENABLE_docs for apidox generation as well and ENABLE_tests for 
building tests.
As far as tests are concerned, ctest scans all targets that have been built in 
project(${projectname}_test) as I suppose, and only these tests are build for 
those prerequisites have been found, so no test for non-existing backend will 
be run (this is what Ingmar was afraid of) - this has been verified.

About macros, I find them not yet flexible as one would expect (or maybe 
there's some macro I don't know about) - what I would like to have in *one* 
macro and what I'm probably going to write in a future:
- ability to add package module name in macro (already in 
macro_optional_find_package)
- ability to specify variable prefix (WITH_ or ENABLE_ or some other) and of 
course default value
- ability to specify description/homepage (something like in 
macro_log_feature)
- ability to specify whether package is required (variable would not be 
specified - maybe I could write another version of this macro for finding 
packages that are required)
- ability to specify package version along with version operator (and 
automatic verification - setting to NOTFOUND when too old or just not the one 
as requested) - unfortunately - all FindXXX modules or some other mechanism 
would need to start returning detected package version.
So macro_log_feature with macro_optional_find_package combined.

cheers

-- 
regards
MM


-----------------------------------------------------------------------
Promocja w Speak Up. Kwartal angielskiego za darmo. 
3 miesiace nauki gratis. Sprawdz teraz! >> http://link.interia.pl/f2019
-------------- next part --------------
A non-text attachment was scrubbed...
Name: soprano-make-optional-targets.patch
Type: text/x-patch
Size: 7769 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-buildsystem/attachments/20090129/afdb188f/attachment-0001.patch 


More information about the Kde-buildsystem mailing list