-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update cpp_info.cppflags -> cpp_info.cxxflags
Deprecated since 1.13.0 conan-io/conan#4611 conan-io/docs#1091
- Loading branch information
Showing
3 changed files
with
26 additions
and
5 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
bincrafters_conventions/actions/update_c_deprecated_attributes.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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
def update_c_deprecated_attributes(main, file): | ||
conanfile = open(file, 'r') | ||
recipe = conanfile.read() | ||
conanfile.close() | ||
|
||
deprecations = { # Official Conan attributes | ||
"self.cpp_info.cppflags": "self.cpp_info.cxxflags", | ||
# Custom attributes | ||
} | ||
|
||
for deprecated, replacement in deprecations.items(): | ||
if deprecated in recipe: | ||
if main.replace_in_file(file, deprecated, replacement): | ||
main.output_result_update(title="Replace deprecated attribute {} with {}".format(deprecated, recipe)) | ||
return True | ||
return True |
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