[calligra] /: Added more checks so cstester, koabstracton and f-office are not built if should not.
Cyrille Berger Skott
cberger at cberger.net
Tue Feb 8 09:09:56 GMT 2011
Hi,
I think this break on clean build, see
http://my.cdash.org/viewBuildError.php?buildid=154035 .
The reason is that BUILD_ variable are only defined when
macro_optional_add_subdirectory is called. The workaround solution is to run
cmake twice, but that is hardly a good solution :)
There is no good solution to that problem, so far the concensus was to ignore
dependencies between BUILD_ variables, meaning, if someone define
BUILD_kword=off, he also needs to define BUILD_koabstraction=off by himself.
I see two ways out of this:
1) drop the use of macro_optional_add_subdirectory, manually set the option,
and condition for each subdirectory, ie at the end of the top CMakeLists.txt,
we would do:
option(BUILD_words "build application words" ON)
option(BUILD_stage "build application stage" ON)
...
then you can use the BUILD_ variables
and
if(BUILD_words)
add_subdirectory(words)
endif()
2) keep the way things are currently, do not try to resolve dependencies
between BUILD_ variables, it is going to be a nightmare anyway, and BUILD_ are
there for people who know what they are doing, and since the main problem we
want to solve is to allow people to build only Krita, like we have a TINY
option, we add a KRITAONLYOPTION that does:
IF (KRITAONLYOPTION)
set(SHOULD_BUILD_WORDS FALSE)
set(SHOULD_BUILD_KPRESENTER FALSE)
set(SHOULD_BUILD_TABLES FALSE)
set(SHOULD_BUILD_KARBON FALSE)
set(SHOULD_BUILD_KRITA TRUE)
set(SHOULD_BUILD_KEXI FALSE)
set(SHOULD_BUILD_FLOW FALSE)
set(SHOULD_BUILD_KPLATO FALSE)
set(SHOULD_BUILD_KFORMULA FALSE)
set(SHOULD_BUILD_KCHART FALSE)
set(SHOULD_BUILD_KDGANTT FALSE)
set(SHOULD_BUILD_KOUNAVAIL FALSE)
set(SHOULD_BUILD_SCRIPTING TRUE)
set(SHOULD_BUILD_F_OFFICE FALSE)
set(SHOULD_BUILD_KOREPORT FALSE)
set(SHOULD_BUILD_BRAINDUMP FALSE)
set(SHOULD_BUILD_CALLIGRA FALSE)
set(SHOULD_BUILD_CSTESTER FALSE)
ENDIF()
On Saturday 05 February 2011, Jaroslaw Staniek wrote:
> Git commit dfb73c66810e7077217037df06d228be90c58cd5 by Jaroslaw Staniek.
> Committed on 05/02/11 at 12:17.
> Pushed by staniek into branch 'master'.
>
> Added more checks so cstester, koabstracton and f-office are not built if
> should not. - build cstester only if Words, Tables and Stage are really
> build, and not for tiny - display status of cstester enabling
> - build koabstraction only if Words and Tables are really build
> - build f-office only if koabstraction is really build
>
> M +28 -7 CMakeLists.txt
> M +8 -7 tools/CMakeLists.txt
>
> http://commits.kde.org/calligra/dfb73c66810e7077217037df06d228be90c58cd5
>
> diff --git a/CMakeLists.txt b/CMakeLists.txt
> index 9847a7e..695415e 100644
> --- a/CMakeLists.txt
> +++ b/CMakeLists.txt
> @@ -51,6 +51,7 @@ IF (TINY)
> set(SHOULD_BUILD_KOREPORT FALSE)
> set(SHOULD_BUILD_BRAINDUMP FALSE)
> set(SHOULD_BUILD_CALLIGRA FALSE)
> + set(SHOULD_BUILD_CSTESTER FALSE)
> ELSE(TINY)
> set(SHOULD_BUILD_WORDS TRUE)
> set(SHOULD_BUILD_KPRESENTER TRUE)
> @@ -69,7 +70,9 @@ ELSE(TINY)
> set(SHOULD_BUILD_KOREPORT TRUE)
> set(SHOULD_BUILD_BRAINDUMP TRUE)
> set(SHOULD_BUILD_CALLIGRA TRUE)
> + set(SHOULD_BUILD_CSTESTER TRUE)
> ENDIF(TINY)
> +set(SHOULD_BUILD_KOABSTRACTION TRUE) # the default
>
> if(KDE4_BUILD_TESTS)
> # only with this definition will the FOO_TEST_EXPORT macro do
> something @@ -328,13 +331,30 @@ endif(SHOULD_BUILD_SCRIPTING)
> # kopageapp
> set(KOPAGEAPP_INCLUDES ${CMAKE_SOURCE_DIR}/libs/kopageapp
> ${CMAKE_SOURCE_DIR}/libs/kopageapp/commands
> ${CMAKE_BINARY_DIR}/libs/kopageapp )
>
> -# koabstraction depends on kotext & flake
> -set(KOABSTRACTION_INCLUDES ${KDE4_INCLUDES}
> - ${KOTEXT_INCLUDES}
> - ${FLAKE_INCLUDES}
> - ${KOPAGEAPP_INCLUDES}
> - ${KOMAIN_INCLUDES}
> - ${CMAKE_SOURCE_DIR}/tools/koabstraction)
> +if(SHOULD_BUILD_TABLES AND BUILD_tables
> + AND SHOULD_BUILD_WORDS AND BUILD_words
> + AND SHOULD_BUILD_KPRESENTER AND BUILD_kpresenter
> + )
> + set(SHOULD_BUILD_KOABSTRACTION FALSE)
> +endif()
> +if(SHOULD_BUILD_KOABSTRACTION AND BUILD_koabstraction)
> + # koabstraction depends on kotext & flake
> + set(KOABSTRACTION_INCLUDES ${KDE4_INCLUDES}
> + ${KOTEXT_INCLUDES}
> + ${FLAKE_INCLUDES}
> + ${KOPAGEAPP_INCLUDES}
> + ${KOMAIN_INCLUDES}
> + ${CMAKE_SOURCE_DIR}/tools/koabstraction)
> +else(SHOULD_BUILD_KOABSTRACTION)
> + set(SHOULD_BUILD_F_OFFICE FALSE)
> +endif()
> +
> +if(SHOULD_BUILD_TABLES AND BUILD_tables
> + AND SHOULD_BUILD_WORDS AND BUILD_words
> + )
> +else()
> + set(SHOULD_BUILD_CSTESTER FALSE)
> +endif()
>
> # koproperty
> SET(KOPROPERTY_TARGETNAME koproperty) # TODO
> remove when we move to independent place @@ -495,6 +515,7 @@
> macro_display_application_enabled(kformula ${SHOULD_BUILD_KFORMULA})
> macro_display_application_enabled(kchart ${SHOULD_BUILD_KCHART})
> macro_display_application_enabled(f-office ${SHOULD_BUILD_F_OFFICE})
> macro_display_application_enabled(calligra ${SHOULD_BUILD_CALLIGRA})
> +macro_display_application_enabled(cstester ${SHOULD_BUILD_CSTESTER})
>
> message(STATUS
> "-------------------------------------------------------------------------
> -" )
>
> diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
> index e0ed04b..43f6403 100644
> --- a/tools/CMakeLists.txt
> +++ b/tools/CMakeLists.txt
> @@ -3,9 +3,9 @@ macro_optional_add_subdirectory( thumbnail )
> macro_optional_add_subdirectory( kthesaurus )
> macro_optional_add_subdirectory( quickprint )
> macro_optional_add_subdirectory( slidecompare )
> -if(SHOULD_BUILD_TABLES AND SHOULD_BUILD_WORDS)
> +if(SHOULD_BUILD_CSTESTER)
> macro_optional_add_subdirectory( cstester )
> -endif(SHOULD_BUILD_TABLES AND SHOULD_BUILD_WORDS)
> +endif(SHOULD_BUILD_CSTESTER)
>
> if(SHOULD_BUILD_CALLIGRA)
> macro_optional_add_subdirectory(calligra)
> @@ -26,13 +26,14 @@ macro_optional_find_package(OpenSSL) # f-office uses
> ssl directly macro_log_feature(OPENSSL_FOUND "OpenSSL" "A toolkit
> implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer
> Security (TLS v1) protocols" "http://openssl.org" FALSE "" "FreOffice uses
> OpenSSL for digital signatures")
>
> -
> # TODO why build koabstraction and f-office only on X11?
> if(X11_FOUND AND LIBXML2_FOUND AND OPENSSL_FOUND)
> - if(Q_WS_X11 AND SHOULD_BUILD_TABLES AND SHOULD_BUILD_WORDS AND
> SHOULD_BUILD_KPRESENTER) - macro_optional_add_subdirectory(
> koabstraction )
> - macro_optional_add_subdirectory( f-office )
> - endif(Q_WS_X11 AND SHOULD_BUILD_TABLES AND SHOULD_BUILD_WORDS AND
> SHOULD_BUILD_KPRESENTER) + if(SHOULD_BUILD_KOABSTRACTION)
> + macro_optional_add_subdirectory(koabstraction)
> + endif(SHOULD_BUILD_KOABSTRACTION)
> + if(Q_WS_X11 AND SHOULD_BUILD_F_OFFICE)
> + macro_optional_add_subdirectory(f-office)
> + endif(Q_WS_X11 AND SHOULD_BUILD_F_OFFICE)
> endif(X11_FOUND AND LIBXML2_FOUND AND OPENSSL_FOUND)
>
> # strigi ships with the odfsaxanalyzer which does already fetch the
> meta-data of
--
Cyrille Berger Skott
More information about the calligra-devel
mailing list