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

Avoid CMP0048 warning #570

Merged
merged 1 commit into from
Dec 26, 2016
Merged

Avoid CMP0048 warning #570

merged 1 commit into from
Dec 26, 2016

Conversation

jagerman
Copy link
Member

Fixes #567.

If pybind's CMakeLists gets loaded via an include_directory from another CMakeLists with a higher minimum version (e.g. 3.0), the project() command without a version produces a CMP0048 warning.

This commit explicitly requests the old behaviour (if the policy exists in the active cmake).

@jagerman jagerman mentioned this pull request Dec 23, 2016
@dean0x7d
Copy link
Member

Setting a policy to OLD is only meant to be a temporary workaround. The OLD policies are deprecated and future versions of CMake are free to remove them. At that point the old behavior becomes an error.

In this case, it should be possible to set the policy to NEW without any other changes. project() sets the version variables to false first and the manual assignment happens later. It would only be a problem if the order was reversed.

Fixes pybind#567.

If pybind's CMakeLists gets loaded via an include_directory from another
CMakeLists with a higher minimum version (e.g. 3.0), the project()
command without a version produces a CMP0048 warning.

This commit explicitly requests the new behaviour if the policy exists,
as it won't cause problems (we set VERSION later).
@jagerman
Copy link
Member Author

Changed it to NEW.

@wjakob
Copy link
Member

wjakob commented Dec 25, 2016

There is a strange failure on Travis-OSX for Python 3.5 (likely unrelated to this PR). Is it possible that gfortran needs to be installed on this platform?

@dean0x7d
Copy link
Member

Homebrew just got Python 3.6 (brew install python3), but numpy and scipy don't have binary wheels for 3.6 yet so it's trying to compile from source and failing. Probably best to allow the failure temporarily until the wheels are released.

@wjakob
Copy link
Member

wjakob commented Dec 25, 2016

ok, sounds good to me. @jagerman -- do you want to include a line in .travis.yml to allow the test failure?

Thanks and happy Christmas
-Wenzel

yungyuc added a commit to yungyuc/pybind11 that referenced this pull request Dec 26, 2016
pybind#570 (comment)

"Homebrew just got Python 3.6 (brew install python3), but numpy and scipy don't have binary wheels for 3.6 yet so it's trying to compile from source and failing."
wjakob pushed a commit that referenced this pull request Dec 26, 2016
* Temporarily allows osx homebrew Python 3.6 to fail.

#570 (comment)

"Homebrew just got Python 3.6 (brew install python3), but numpy and scipy don't have binary wheels for 3.6 yet so it's trying to compile from source and failing."
@wjakob wjakob merged commit a3fec90 into pybind:master Dec 26, 2016
@wjakob
Copy link
Member

wjakob commented Dec 26, 2016

Merged, thanks!

@rwgk rwgk mentioned this pull request Feb 9, 2023
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.

None yet

3 participants