-
Notifications
You must be signed in to change notification settings - Fork 976
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
Add support for YouCompleteMe integration #65
Conversation
Looks like it's back to the ol' drawing board and see what I'm breaking... |
@@ -76,6 +76,7 @@ def load_conan(self, conan_file_path, consumer=False): | |||
result = self._create_check_conan(loaded, consumer) | |||
if consumer: | |||
result.options.initialize_upstream(self._options) | |||
type(result).conanfile_directory = property(lambda self, _path=conan_file_path: os.path.dirname(_path)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I'd say it'd be better to handle this in a separate pull request. In particular, I think that the conanfile_directory can be made an explicit property in the base ConanFile class. If the path is dynamically assigned as it seems the case, I'd assign it here (and comment in the ConanFile class property that the value is dynamic). I like conanfile user-related things to be at least defined in the base ConanFile class for reference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll cherry pick out this commit and create a separate pull request. We can discuss the best way to handle it in there.
Overall, this seems a very interesting contribution, thanks very much!! I am checking a minor detail, but it can be merged. If you can have a look to the conanfile_directory thing, and do a separate PR, great, but not a big issue, I'll merge it anyway as-is. |
…at it can be referenced later" This reverts commit ff12505.
…nts on pull request).
Awesome! Thanks a lot, it is perfect now. Lets merge it :) |
Add support for YouCompleteMe integration
Add support for YouCompleteMe code-completion engine for Vim. This will generate the python file for it to work with the build/install directories generated by conan.
As part of this change, I also added support for calculating the current cpp info when writing the generator. This allows the current generator to take advantage of the packages intended compilation flags.
I also attached a property to each
ConanFile
that gets loaded calledconanfile_directory
. This contains the directory from which theConanFile
was loaded. It's completely unrelated to the other change so we can probably create a separate pull request for it, if it's desired.