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

Clear instead of header_only alternative #11478

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions conans/model/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -575,11 +575,14 @@ def serialize_min(self):
"recipe_hash": self.recipe_hash}
return conan_info_json

# FIXME: Rename this to "clear" in 2.0
def header_only(self):
self.settings.clear()
self.options.clear()
self.requires.clear()

clear = header_only

def msvc_compatible(self):
if self.settings.compiler != "msvc":
return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def test_transitive_second_level_header_only(self):
client.run("create . libb/1.0@")
# libC -> libB

unrelated = "self.info.header_only()"
unrelated = "self.info.clear()"
client.save({"conanfile.py": GenConanfile().with_require("libb/1.0")
.with_package_id(unrelated)})
client.run("create . libc/1.0@")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def configure(self):
self.provides = 'libjpeg'

def package_info(self):
self.info.header_only()
self.info.clear()
""")

def test_conflict_requirement(self):
Expand Down