-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FindLibClang: add version 8.0.0_1 #539
FindLibClang: add version 8.0.0_1 #539
Conversation
Fixes #540. |
Hum, Isn't there some common install prefix that Homebrew install all its softwares? Maybe supporting Homebrew is just a matter of specifying a |
ClangConfig.cmake is located in |
Reading the Homebrew documentation, I am under the impression that each package is installed in a versioned directory under a "Cellar", but it should be symlink to /usr/local (or another customized prefix). That looks like it should requires nothing from CMake, apart maybe from If the LLVM/Clang package is different from that, it would be nice to know why, and what is expected to do for consumers like irony-mode? |
Does the build work when you use?
|
Yes, adding that prefix to the You are right that Homebrew usually symlinks its packages under (Apple's own |
Well, I would prefer a PR that adds But to be honest, I don't think it fits in this place anymore, and it would be better to specify irony-mode/server/src/CMakeLists.txt Line 4 in c3ae899
This can be done by settings I'm not sure I will update the |
@Sarcasm I think the suggestion to set I'm happy to make that change, along with similar modifications for other common configurations (Debian/Ubuntu, MacPorts, FreeBSD, Gentoo), if someone else is willing to provide the appropriate paths. |
It's also worth noting that |
This commit adds search paths for the `ClangConfig.cmake` config file corresponding to the latest version of LLVM present in Homebrew. Another approach for detecting a macOS Homebrew install of the "llvm" package (latest stable version) would be to add `/usr/local/opt/llvm` to the list of search paths. Homebrew installs of older major versions of LLVM are symlinked to paths of the form `/usr/local/opt/llvm@${MAJOR_VERSION}` (e.g., `/usr/local/opt/llvm@7/`, `/usr/local/opt/llvm@6/`).
281ae60
to
5396dd3
Compare
Changes made in 5396dd3. |
Hum, I'm not fond of the patch, I think this is better set externally, in the user config or eventually in some .el in irony mode (but that can come at a latter time). Right now we could add the following, with instructions in the Wiki or README: (setq irony-extra-cmake-args
(list (format "-DCMAKE_PREFIX_PATH=%s" (or (getenv "HOMEBREW_PREFIX")
"/usr/local/opt/llvm")))) I don't want to handle all the package managers out there, the benefit of |
@Sarcasm I like your suggestion. Perhaps the code snippet should be slightly modified? (setq irony-extra-cmake-args
(list (format "-DCMAKE_PREFIX_PATH=%s" (concat (or (getenv "HOMEBREW_PREFIX")
"/usr/local")) "/opt/llvm"))
|
Ah yes you are right. |
This commit adds the version string "8.0.0_1" to the list of LLVM
versions because the current version of LLVM in Homebrew (as of the
time of this commit) is version 8.0.0_1.
Another approach for detecting a macOS Homebrew install of the "llvm"
package (latest stable version) would be to add
/usr/local/opt/llvm
to the list of search paths. Homebrew installs of older major versions
of LLVM are symlinked to paths of the form
/usr/local/opt/llvm@${MAJOR_VERSION}
(e.g.,/usr/local/opt/llvm@7/
,/usr/local/opt/llvm@6/
).