Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
czoido committed Jun 7, 2024
1 parent 813c72b commit 6538c08
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/integration/toolchains/apple/test_xcodetoolchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,14 @@ def test_toolchain_flags():
assert "OTHER_LDFLAGS = $(inherited) flag3 flag4" in conan_global_flags
conan_global_file = client.load("conan_config.xcconfig")
assert '#include "conan_global_flags.xcconfig"' in conan_global_file


def test_flags_generated_if_only_defines():
# https://github.com/conan-io/conan/issues/16422
client = TestClient()
client.save({"conanfile.txt": "[generators]\nXcodeToolchain\n"})
client.run("install . -c 'tools.build:defines=[\"MYDEFINITION\"]'")
conan_global_flags = client.load("conan_global_flags.xcconfig")
assert "GCC_PREPROCESSOR_DEFINITIONS = $(inherited) MYDEFINITION" in conan_global_flags
conan_global_file = client.load("conan_config.xcconfig")
assert '#include "conan_global_flags.xcconfig"' in conan_global_file

0 comments on commit 6538c08

Please sign in to comment.