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

[question] Is it possible to unset value in [settings] section of profile? #16624

Open
1 task done
Nekto89 opened this issue Jul 7, 2024 · 2 comments
Open
1 task done
Assignees

Comments

@Nekto89
Copy link
Contributor

Nekto89 commented Jul 7, 2024

What is your question?

Hi,

After upgrading OS/Xcode/CMake on Macos machine CMake started to initializing CMAKE_OSX_DEPLOYMENT_TARGET that leads to initialization of "os.version" in conan-cmake. I have old recipe for prebuilt binaries that wasn't ready for this. It doesn't delete settings.os.version.

def package_id(self):
        del self.info.settings.compiler
        del self.info.settings.build_type

Is it possible to unset os.version through profile for one specific package? I've found some documentation for different sections and tried using =!, =None, just =, but nothing seems to be working for settings.

[settings]
mylibrary/*:os.version=!

Have you read the CONTRIBUTING guide?

  • I've read the CONTRIBUTING guide
@memsharded memsharded self-assigned this Jul 7, 2024
@memsharded
Copy link
Member

Hi @Nekto89

Thanks for your question.

The settings don't have the possibility of unsetting them if they have already been set.

Maybe just modifying your conan_provider.cmake is the easiest to avoid this?

Do you have more info on the change of CMAKE_OSX_DEPLOYMENT_TARGET, is there a known policy for this? It is not common that CMake will change behavior this way without a policy.

@Nekto89
Copy link
Contributor Author

Nekto89 commented Jul 8, 2024

Hi @Nekto89

Thanks for your question.

The settings don't have the possibility of unsetting them if they have already been set.

Maybe just modifying your conan_provider.cmake is the easiest to avoid this?

Do you have more info on the change of CMAKE_OSX_DEPLOYMENT_TARGET, is there a known policy for this? It is not common that CMake will change behavior this way without a policy.

It's probably caused by newer Xcode that has new SDK.
I've installed Xcode 14.2 - the latest one that is available for that old mac machine with macOS Monterey (12.7.5). CMake initializes CMAKE_OSX_DEPLOYMENT_TARGET with 12.7.

"If the automatically selected SDK is newer than the host OS version
and no deployment version has been set then adjust the deployment
version to the host OS version. Otherwise the user won't be able to
launch the executables on the build host."

https://gitlab.kitware.com/cmake/cmake/-/commit/24aafbde115647b7e599d112d0bcc4f03c3e9b88

I think that it's ok to have os.version for all the other packages. There is only 1 that I just don't want to repack. But I'll have to duplicate binaries with updated recipe if conan doesn't support this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants