Skip to content

Add support for the CMAKE environmental variable #42

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

Merged
merged 1 commit into from
Dec 6, 2017

Conversation

marmistrz
Copy link
Contributor

No description provided.

@alexcrichton
Copy link
Member

Thanks for the PR! Is the precedent for doing somethign like this?

@marmistrz
Copy link
Contributor Author

marmistrz commented Nov 30, 2017

Yes, without this PR it's impossible to compile Servo on CentOS, since cmake is CMake 2.x, cmake3 is CMake 3.x. (more precisely, some of its deps, which uses target_sources)

@alexcrichton
Copy link
Member

Could this perhaps automatically detect that and not require use of the env var? Do other projects use CMAKE?

@marmistrz
Copy link
Contributor Author

I don't think it's a good idea. For example, in Arch you can install cmake 2.x to /usr/bin/cmake-2 and it may be useful to fall back to cmake 2 if there are some compatibility issues with cmake 3.

@alexcrichton
Copy link
Member

Is the CMAKE env var standard in any other systems? I'd be somewhat wary of creating a "new standard" in a sense...

@marmistrz
Copy link
Contributor Author

I have never seen anything like this, probably because cmake is usually run manually, where one can specify the path himself.
If you have an idea for a better variable, let me know.

@alexcrichton
Copy link
Member

Ok sounds like we should go with this as is then, so I'll merge! Maybe we can now be trendsetters :)

@alexcrichton alexcrichton merged commit a1c71ea into rust-lang:master Dec 6, 2017
@marmistrz
Copy link
Contributor Author

marmistrz commented Dec 7, 2017

The rusty avant-garde! :)
My plan for now:

  1. Bump the version to include this change
  2. Bump the cmake-rs dependency in gecko-media to allow build on CentOS
  3. Edit the servo README with extra instructions how to build on CentOS.

Is it feasible? Should I just make a PR to this repo bumping the version to achieve 1.?

@alexcrichton
Copy link
Member

Sounds reasonable! Nah it's ok I'll go ahead and do the bump

bors-servo pushed a commit to servo/gecko-media that referenced this pull request Dec 7, 2017
Bump the version of cmake to allow fixing build on CentOS

See rust-lang/cmake-rs#42 (comment) for motivation
bors-servo pushed a commit to servo/gecko-media that referenced this pull request Dec 8, 2017
Bump the version of cmake to allow fixing build on CentOS

See rust-lang/cmake-rs#42 (comment) for motivation
bors-servo pushed a commit to servo/gecko-media that referenced this pull request Dec 8, 2017
Bump the version of cmake to allow fixing build on CentOS

See rust-lang/cmake-rs#42 (comment) for motivation
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