-
Notifications
You must be signed in to change notification settings - Fork 986
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Explore other more explicit alternatives to automatically manage the …
…options (#14320) * add options_auto_handle to auto handle options * add with_options_auto_handle * minor changes * review * implement implements * fix comment * review * unused import --------- Co-authored-by: memsharded <[email protected]>
- Loading branch information
1 parent
d09ae5b
commit 2dde121
Showing
8 changed files
with
24 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
conan/tools/helpers.py → conans/client/conanfile/implementations.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
from conans.model.pkg_type import PackageType | ||
|
||
|
||
def default_config_options(conanfile): | ||
def auto_shared_fpic_config_options(conanfile): | ||
if conanfile.settings.get_safe("os") == "Windows": | ||
conanfile.options.rm_safe("fPIC") | ||
|
||
|
||
def default_configure(conanfile): | ||
def auto_shared_fpic_configure(conanfile): | ||
if conanfile.options.get_safe("header_only"): | ||
conanfile.options.rm_safe("fPIC") | ||
conanfile.options.rm_safe("shared") | ||
elif conanfile.options.get_safe("shared"): | ||
conanfile.options.rm_safe("fPIC") | ||
|
||
|
||
def default_package_id(conanfile): | ||
def auto_header_only_package_id(conanfile): | ||
if conanfile.options.get_safe("header_only") or conanfile.package_type is PackageType.HEADER: | ||
conanfile.info.clear() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters