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

--build-system not always available #549

Closed
brentVilla opened this issue Dec 13, 2018 · 3 comments
Closed

--build-system not always available #549

brentVilla opened this issue Dec 13, 2018 · 3 comments

Comments

@brentVilla
Copy link

In rez-build's finding on what build-system plugin to use, it only defines the --build-system flag if two or more build systems are detected. This is problematic because there is no way to force the build system if you have build infrastructure that is building codebases that may find a single build system and others find multiple. You can't configure the build infrastructure to always pass a --build-system flag because that will fail for codebases where only a single build system is defined. And you can't leave out that flag because then you'll get errors for multi-build system codebases.

Some options:

  1. Always define the --build-system flag, even for single build system codebases. Raise an error if the value of --build-system doesn't match the build system found.
  2. Have a default build system configuration value that rez-build will use in codebases with when multiple build systems are found and a --build-system flag is not provided.
  3. Be able to specify the default build system in the package.py file.
@nerdvegas
Copy link
Contributor

I'm going to include (1) and (3) in a fix shortly. I'm also going to remove the predetermined 'choices' list for --build-system... this isn't really necessary, and it causes an extra package.py evaluation. Typically this doesn't matter much, but I'm starting to think about packages with more expensive evaluations (ie early-bound functions). For eg, consider a smart installer package that retrieves info from a website.

@nerdvegas
Copy link
Contributor

So I've stumbled on an unfortunate problem. The cmake build system has its own --build-system option. This has never conflicted before, because the cmake args are only added to the argparser if there's one valid build system... in which case, the standard --build-system option isn't added.

There is no fix for this other than removing or changing the cmake --build-system arg, so it's a rare case where I have to break backwards compatibility. I will change it to --cmake-build-system... hopefully, if anyone is using this, they're using the --bs short form.

@nerdvegas nerdvegas mentioned this issue Dec 14, 2018
@nerdvegas
Copy link
Contributor

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

No branches or pull requests

2 participants