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

InstallBasicPackageFiles: change default for NO_SET_AND_CHECK_MACRO and NO_CHECK_REQUIRED_COMPONENTS_MACRO #267

Open
drdanz opened this issue Aug 6, 2019 · 2 comments

Comments

@drdanz
Copy link
Member

drdanz commented Aug 6, 2019

At the moment the NO_SET_AND_CHECK_MACRO and NO_CHECK_REQUIRED_COMPONENTS_MACRO can be used to disable some parts of code generated by configure_package_config_file.
For the basic install_basic_package_file usage, these parts of code are not useful though, and therefore these options are set in most of the cases.

I'd like to deprecate these 2 options, and pass them by default to configure_package_config_file.

We could add the ENABLE_SET_AND_CHECK_MACRO and ENABLE_CHECK_REQUIRED_COMPONENTS_MACRO options instead.

Anyway, this would be a small breaking change if someone is actually relying on these macros, so perhaps we can parse the Config.cmake file, and check if these macros are used, and eventually enable it. If this works, we could simply forgot about the option, and just parse the files, and enable whatever is used.

What do you think?

@PeterBowman
Copy link
Member

Anyway, this would be a small breaking change if someone is actually relying on these macros, so perhaps we can parse the Config.cmake file, and check if these macros are used, and eventually enable it. If this works, we could simply forgot about the option, and just parse the files, and enable whatever is used.

Corner case: the config file include()s a file in which set_and_check() is used.

@drdanz
Copy link
Member Author

drdanz commented Aug 7, 2019

@PeterBowman I've never seen it, but I assume it is possible... So perhaps we could have the detection, but also the FORCE_SET_AND_CHECK_MACRO and FORCE_CHECK_REQUIRED_COMPONENTS_MACRO options to skip the detection and just add it...

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

No branches or pull requests

2 participants