About failing hard and failing gracefully in the svn -> git transition period
Sebastian Dörner
sebastian at sebastian-doerner.de
Sun Jun 10 23:48:48 UTC 2012
Hi,
until we have finished the split and also release individual tarballs,
we have to support whole module builds. For splitting the root
CMakeLists.txt, we wanted to restrict the code in there to lines like
kdesdk_optional_add_subdirectory(umbrello)
without checking for any required packages before. There are basically
two options for how to handle required packages in the submodules:
a) Fail if not existent, basically by setting the boolean in
macro_log_feature() to true. (Inferior solution, as was just the case
for umbrello, is to fail later when we actually need that library).
con: This breaks the build of the whole module, instead of failing gracefully
pro: When building the submodule independently, you get a FAIL instead
of a "successful" build without anything actually building.
b) Fail gracefully by setting the boolean in macro_log_feature() to
false. Then, skip the actual source code, as in:
if(LIBXSLT_FOUND AND LIBXML2_FOUND AND Boost_FOUND)
add_subdirectory( umbrello )
endif(LIBXSLT_FOUND AND LIBXML2_FOUND AND Boost_FOUND)
(This is within the submodule!!)
pro: This lets the KDESDK build continue, by just skipping over the submodule
con: The individual build is shown as "successful", although nothing
is actually built.
So I think the best solution is to:
Stick to option b) as long as we are in svn. Once we have converted to
git, we need to keep option b) in the 4.9 branch (as the release dude
will fake a kdesdk tarball). However, in master we should switch to
option a), because we don't need to support whole-module builds
anymore.
Please keep that in mind when making the remaining submodules
cmake-selfcontained.
Regards
Sebastian
More information about the kde-sdk-devel
mailing list