Skip to content

Conversation

@acxz
Copy link
Contributor

@acxz acxz commented Jun 25, 2020

Resolves #2264

@acxz
Copy link
Contributor Author

acxz commented Jul 26, 2020

@wjakob can you take a look at this PR?

@acxz
Copy link
Contributor Author

acxz commented Jul 26, 2020

based on disc on #2160 gonna close/reopen this PR

@acxz acxz closed this Jul 26, 2020
@acxz acxz reopened this Jul 26, 2020
@henryiii
Copy link
Collaborator

henryiii commented Jul 30, 2020

One tiny change - could you add a check to make sure this only gets added when built as the main project? PYBIND11_MASTER_PROJECT, IIRC. If a parent project wants to add this, they should do it themselves. Also, target names are global, so this addition would break projects that have an uninstall target defined later, unless we add this check. Uninstall targets are a little tricky (since they take a list of files and delete them), which is why CMake doesn't have built in support for it even now.

I'll help if it conflicts with #2338.

@henryiii henryiii self-requested a review July 30, 2020 00:17
@acxz
Copy link
Contributor Author

acxz commented Jul 30, 2020

The CI errors seem unrelated

@henryiii
Copy link
Collaborator

Rebased after #2338 and force-pushed.

@henryiii henryiii merged commit 6f6e939 into pybind:master Jul 31, 2020
@henryiii
Copy link
Collaborator

Thanks!

@acxz acxz deleted the uninstall_target branch July 31, 2020 01:34
@henryiii henryiii mentioned this pull request Jul 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Create uninstall target for CMake

2 participants