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

[Bugfix] Setting CMAKE_OSX_DEPLOYMENT_TARGET as cache entry #9498

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: 2 additions & 1 deletion conan/tools/cmake/toolchain.py
Expand Up @@ -319,7 +319,8 @@ class AppleSystemBlock(Block):
# but full path is necessary for others
set(CMAKE_OSX_SYSROOT {{ CMAKE_OSX_SYSROOT }} CACHE STRING "" FORCE)
{% if CMAKE_OSX_DEPLOYMENT_TARGET is defined %}
set(CMAKE_OSX_DEPLOYMENT_TARGET {{ CMAKE_OSX_DEPLOYMENT_TARGET }})
# Setting CMAKE_OSX_DEPLOYMENT_TARGET if "os.version" is defined by the used conan profile
set(CMAKE_OSX_DEPLOYMENT_TARGET "{{ CMAKE_OSX_DEPLOYMENT_TARGET }}" CACHE STRING "")
{% endif %}
""")

Expand Down
2 changes: 1 addition & 1 deletion conans/test/unittests/tools/cmake/test_cmaketoolchain.py
Expand Up @@ -164,4 +164,4 @@ def conanfile_apple():
def test_osx_deployment_target(conanfile_apple):
toolchain = CMakeToolchain(conanfile_apple)
content = toolchain.content
assert 'set(CMAKE_OSX_DEPLOYMENT_TARGET 10.15)' in content
assert 'set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "")' in content