This is an archive of the discontinued LLVM Phabricator instance.

[CMake] Unify handling of libxml2 with other libraries
AbandonedPublic

Authored by phosek on May 30 2018, 3:01 PM.

Details

Summary

Use LLVM_ENABLE_LIBXML2 to enable the use of libxml2 and HAVE_LIBXML2
to signal its presence.

Diff Detail

Event Timeline

phosek created this revision.May 30 2018, 3:01 PM
delcypher added inline comments.May 30 2018, 4:30 PM
llvm/cmake/config-ix.cmake
167

If LLVM_ENABLE_LIBXML2 is enabled but we don't find libxml2 then we should emit an error.

llvm/test/lit.site.cfg.py.in
38

Isn't @HAVE_LIBXML2@ going to expand to the string TRUE? That doesn't seem like it would work. First because it's not quoted, second because config.have_libxml2 probably should be a python bool.

vitalybuka resigned from this revision.May 30 2018, 6:01 PM
phosek added inline comments.May 30 2018, 9:59 PM
llvm/test/lit.site.cfg.py.in
38

It'll because of llvm_canonicalize_cmake_booleans, see the change above in llvm/test/CMakeLists.txt.

phosek updated this revision to Diff 227020.Oct 29 2019, 7:52 PM
phosek marked an inline comment as done.
phosek edited reviewers, added: smeenai; removed: vitalybuka.
Herald added a project: Restricted Project. · View Herald TranscriptOct 29 2019, 7:52 PM
phosek marked an inline comment as not done.Oct 29 2019, 7:52 PM
phosek added inline comments.
llvm/cmake/config-ix.cmake
167

This is already handled by the check below (when LLVM_ENABLE_LIBXML2 is set to FORCE_ON), we could check it to emit an error even when it's set just to ON but I don't know whether that's going to break any existing users?

phosek abandoned this revision.Feb 5 2020, 9:46 PM