Skip to content

Commit

Permalink
Merge pull request #10810 from czoido/port_markdown_gen_fix
Browse files Browse the repository at this point in the history
Fix call to undefined function for markdown generator when components…
  • Loading branch information
czoido committed Mar 17, 2022
2 parents 72f3918 + 4d8a780 commit 2ace493
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion conans/client/generators/markdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
* Links to libraries: {{ join_list_bold(cpp_info.libs) }}
{%- endif %}
{%- if cpp_info.system_libs %}
* Systems libs: {{ join_list_sources(cpp_info.system_libs) }}
* Systems libs: {{ join_list_bold(cpp_info.system_libs) }}
{%- endif %}
{%- if cpp_info.defines %}
* Preprocessor definitions: {{ join_list_code(cpp_info.defines) }}
Expand Down
15 changes: 15 additions & 0 deletions conans/test/integration/generators/markdown_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,3 +145,18 @@ def package_info(self):
content = client.load("bar.md")
self.assertIn("main.c", content)
self.assertIn("project(bar_project C)", content)

def test_with_sys_requirements(self):
conanfile = textwrap.dedent("""
import os
from conans import ConanFile
class HelloConan(ConanFile):
def package_info(self):
self.cpp_info.components["component1"].system_libs = ["system_lib"]
""")
client = TestClient()
client.save({"conanfile.py": conanfile})
client.run("create . bar/0.1.0@user/testing")
client.run("install bar/0.1.0@user/testing -g markdown")
assert "Generator markdown created bar.md" in client.out

0 comments on commit 2ace493

Please sign in to comment.