{"action":"created","issue":{"url":"https://api.github.com/repos/jeaye/color_coded/issues/114","repository_url":"https://api.github.com/repos/jeaye/color_coded","labels_url":"https://api.github.com/repos/jeaye/color_coded/issues/114/labels{/name}","comments_url":"https://api.github.com/repos/jeaye/color_coded/issues/114/comments","events_url":"https://api.github.com/repos/jeaye/color_coded/issues/114/events","html_url":"https://github.com/jeaye/color_coded/pull/114","id":130501534,"number":114,"title":"Revamp build infrastructure for Clang/LLVM","user":{"login":"tony","id":26336,"avatar_url":"https://avatars.githubusercontent.com/u/26336?v=3","gravatar_id":"","url":"https://api.github.com/users/tony","html_url":"https://github.com/tony","followers_url":"https://api.github.com/users/tony/followers","following_url":"https://api.github.com/users/tony/following{/other_user}","gists_url":"https://api.github.com/users/tony/gists{/gist_id}","starred_url":"https://api.github.com/users/tony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tony/subscriptions","organizations_url":"https://api.github.com/users/tony/orgs","repos_url":"https://api.github.com/users/tony/repos","events_url":"https://api.github.com/users/tony/events{/privacy}","received_events_url":"https://api.github.com/users/tony/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-02-01T22:13:38Z","updated_at":"2016-02-05T11:32:08Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/jeaye/color_coded/pulls/114","html_url":"https://github.com/jeaye/color_coded/pull/114","diff_url":"https://github.com/jeaye/color_coded/pull/114.diff","patch_url":"https://github.com/jeaye/color_coded/pull/114.patch"},"body":"Improve finding llvm and clang across platforms. With this patch, the a majority of systems will be able to use their clang/llvm from their package manager without needing to download clang+llvm. This makes it much smoother to install color_coded, as well as much more manageable to handle via ``NeoBundle`` across platforms.\r\n\r\n``-DDOWNLOAD_CLANG=1`` can be used to force download.\r\n\r\n``-DCUSTOM_CLANG`` is deprecated.\r\n\r\nThe prior version of clang/link.cmake wasn't reliable in finding LLVM/Clang automatically. It often required entering additional arguments for LLVM/Clang, the locations of which are not consistent across systems, package managers and versions.\r\n\r\nFindLibClang can be used to find clang libraries across systems in unison with FindLLVM.\r\n\r\nBoth support ``${LLVM_ROOT_DIR}``, so the modules will load the libraries in download form.\r\n\r\nTested with both download and packaged libraries (llvm/clang 3.7) on FreeBSD 11-CURRENT,   Ubuntu 15.10 and OS X 10.11 El Capitan.\r\n\r\nTo test downloading:\r\n\r\n``rm -rf ~/.vim/bundle/color_coded/build/*; cmake .. -DDOWNLOAD_CLANG=1 -GNinja && ninja install``\r\n\r\nTo test with clang/llvm installed from package managers:\r\n\r\n``rm -rf ~/.vim/bundle/color_coded/build/*; cmake .. -GNinja && ninja install``"},"comment":{"url":"https://api.github.com/repos/jeaye/color_coded/issues/comments/180308282","html_url":"https://github.com/jeaye/color_coded/pull/114#issuecomment-180308282","issue_url":"https://api.github.com/repos/jeaye/color_coded/issues/114","id":180308282,"user":{"login":"UnrealQuester","id":3252092,"avatar_url":"https://avatars.githubusercontent.com/u/3252092?v=3","gravatar_id":"","url":"https://api.github.com/users/UnrealQuester","html_url":"https://github.com/UnrealQuester","followers_url":"https://api.github.com/users/UnrealQuester/followers","following_url":"https://api.github.com/users/UnrealQuester/following{/other_user}","gists_url":"https://api.github.com/users/UnrealQuester/gists{/gist_id}","starred_url":"https://api.github.com/users/UnrealQuester/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UnrealQuester/subscriptions","organizations_url":"https://api.github.com/users/UnrealQuester/orgs","repos_url":"https://api.github.com/users/UnrealQuester/repos","events_url":"https://api.github.com/users/UnrealQuester/events{/privacy}","received_events_url":"https://api.github.com/users/UnrealQuester/received_events","type":"User","site_admin":false},"created_at":"2016-02-05T11:32:08Z","updated_at":"2016-02-05T11:32:08Z","body":"I would love to have an option to use the system clang libs, but I do not think it should be the default. Many tools that rely on libclang use this approach. This is much less error prone than relying on the system libclang. Some distributions add custom patches and have different versions of clang installed. This makes errors harder to debug for us.\r\n\r\n@tony: You mention that the process of downloading clang is error prone. What kind of errors did you encounter?\r\n\r\nAlso, we might want to try something like [kitchen](https://github.com/test-kitchen/test-kitchen) to test the build on multiple platforms."}}