[Webkit-unassigned] [Bug 37945] CMake buildsystem

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu May 13 12:18:41 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=37945





--- Comment #35 from Patrick R. Gansterer <paroga at paroga.com>  2010-05-13 12:18:41 PST ---
(In reply to comment #34)
> Patrick, Please let's not go this route. It is called "automagic" to automatically enable or disable features based on the installed libraries. If we do this, we still need to have explicit/forceful disable/enable that will check the library and emit error messages. If we don't do this, systems that build packages without a clean tree (many cases, like Gentoo users) the packaging system will not know features were enabled and thus the package have dependencies!  To add both automatic and manual, it starts to be a real PITA as many features have multiple dependencies and code start to be messy (I'm saying because I had to care about it for EFL and Gentoo packages, it was troublesome).

No, no! I don't like the idea of "automagic" too! I think I wrote it badly. What I meant was sth like this:

root/CMakeLists.txt:

FIND_PACKAGE(SQLite) # No REQUIRED

IF (USER_REQUEST_ENABLE_DATABASE)
    IF (NOT ${SQLITE_FOUND})
        MESSAGE(FATAL_ERROR "You need SQLite")
    ENDIF ()
    SET(ENABLE_DATABASE 1)
ELSE ()
    SET(ENABLE_DATABASE 0)
ENDIF()

root/WebCore/CMakeLists.txt:

IF (ENABLE_DATABASE)
    LIST(APPEND WebCore_SOURCES ...)
    LIST(APPEND WebCore_LIBRARIES ${SQLITE_LIBRARY})
ENDIF ()


Maybe it's also possible to change the root CMakeLists.txt to:
SET(ENABLE_DATABASE ${USER_REQUEST_ENABLE_DATABASE}) # You macro does better
IF (ENABLE_DATABASE)
    FIND_PACKAGE(SQLite REQUIRED)
ENDIF()

I think the 3rdpary library dection has to be done in the root CMakeLists.txt (or a FindStuff.cmake which is included in root CMakeLists.txt)

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list