Skip to content
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

Fix running VisualStudio env when building #975

Conversation

spsalefeve
Copy link
Contributor

This PR fixes Issue #974 .

@nerdvegas
Copy link
Contributor

I can't merge this PR yet, but it's on the right track. You are right in that CMAKE_MODULE_PATH should be getting set earlier, I think.

I think the reason post_actions_callback was being used is because this is where pre_build_commands is getting run from. With this PR, pre_build_commands would get run before package commands, instead of after, and I can see that breaking existing behaviour for some users (it also feels correct that pre_build_commands should be run as late as possible, but before the build - this is intuitive).

I think what we need to do is:

  • split BuildSystem.add_standard_build_actions so that pre_build_commands setup is done in another method (eg add_pre_build_commands)
  • keep the change in this PR that uses actions_callback instead, but also add a post_actions_callback that calls add_pre_build_commands.

In other words, we want what this PR is doing, but pre_build_commands should always be run via post_actions_callback instead.

Please note that this change needs to be done in all the build system plugins, not just cmake, for reasons of consistency. Fortunately it looks like a pretty trivial change.

Thx
A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants