-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
added opus 1.5.1 #23234
Merged
Merged
added opus 1.5.1 #23234
Changes from 9 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
dfead60
[config] Add some conan v2 ready refenrences to the list
danimtb a902e63
Merge remote-tracking branch 'upstream/master'
3dfa6f2
Merge branch 'master' of github.com:conan-io/conan-center-index
danimtb 7523837
added opus 1.5.1
dmpriso 00fb85d
Added CMP0077 as suggested
dmpriso ffa8dca
Change sources url
danimtb 3532fe9
add cmake 3.16 or higher br
danimtb 8675b48
gcc5 invalid
danimtb c0c1f61
gcc7 invalid
danimtb f8d4562
Update cmake variables
uilianries cd41697
Remove new options due dnn
uilianries dd244bb
Add Virtualbuildenv for cmake
uilianries a7895ae
Add missing Version
uilianries 73bc849
Apply lint suggestiongs
uilianries File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1,4 +1,5 @@ | ||||||||||||||||||||||||
from conan import ConanFile | ||||||||||||||||||||||||
from conan.errors import ConanInvalidConfiguration | ||||||||||||||||||||||||
from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout | ||||||||||||||||||||||||
from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir | ||||||||||||||||||||||||
from conan.tools.microsoft import check_min_vs | ||||||||||||||||||||||||
|
@@ -21,14 +22,24 @@ class OpusConan(ConanFile): | |||||||||||||||||||||||
"fPIC": [True, False], | ||||||||||||||||||||||||
"fixed_point": [True, False], | ||||||||||||||||||||||||
"stack_protector": [True, False], | ||||||||||||||||||||||||
"osce": [True, False], | ||||||||||||||||||||||||
"deep_plc": [True, False], | ||||||||||||||||||||||||
"dred": [True, False], | ||||||||||||||||||||||||
} | ||||||||||||||||||||||||
default_options = { | ||||||||||||||||||||||||
"shared": False, | ||||||||||||||||||||||||
"fPIC": True, | ||||||||||||||||||||||||
"fixed_point": False, | ||||||||||||||||||||||||
"stack_protector": True, | ||||||||||||||||||||||||
"osce": False, | ||||||||||||||||||||||||
"deep_plc": False, | ||||||||||||||||||||||||
"dred": False, | ||||||||||||||||||||||||
} | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
def build_requirements(self): | ||||||||||||||||||||||||
if self.version == "1.5.2": | ||||||||||||||||||||||||
self.tool_requires("cmake/[>=3.16 <4]") | ||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this was required by the original cmakelist of the library |
||||||||||||||||||||||||
|
||||||||||||||||||||||||
def export_sources(self): | ||||||||||||||||||||||||
export_conandata_patches(self) | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
|
@@ -47,6 +58,8 @@ def layout(self): | |||||||||||||||||||||||
|
||||||||||||||||||||||||
def validate(self): | ||||||||||||||||||||||||
check_min_vs(self, 190) | ||||||||||||||||||||||||
if self.version == "1.5.2" and self.settings.compiler == "gcc" and self.settings.compiler.version in ["5", "7"]: | ||||||||||||||||||||||||
raise ConanInvalidConfiguration(f"GCC {self.settings.compiler.version} not supported due to lack of AVX2 support") | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
def source(self): | ||||||||||||||||||||||||
get(self, **self.conan_data["sources"][self.version], | ||||||||||||||||||||||||
|
@@ -56,6 +69,10 @@ def generate(self): | |||||||||||||||||||||||
tc = CMakeToolchain(self) | ||||||||||||||||||||||||
tc.variables["OPUS_FIXED_POINT"] = self.options.fixed_point | ||||||||||||||||||||||||
tc.variables["OPUS_STACK_PROTECTOR"] = self.options.stack_protector | ||||||||||||||||||||||||
tc.variables["OPUS_OSCE"] = self.options.osce | ||||||||||||||||||||||||
tc.variables["OPUS_DEEP_PLC"] = self.options.deep_plc | ||||||||||||||||||||||||
tc.variables["OPUS_DRED"] = self.options.dred | ||||||||||||||||||||||||
dmpriso marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||
tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" | ||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||
tc.generate() | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
def build(self): | ||||||||||||||||||||||||
|
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,4 +1,6 @@ | ||
versions: | ||
"1.5.2": | ||
folder: all | ||
"1.4": | ||
folder: all | ||
"1.3.1": | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest removing these new options.
When any of them is enabled, it will require DNN support as well:
https://gitlab.xiph.org/xiph/opus/-/compare/v1.4...v1.5.2?from_project_id=36&straight=false#9a2aa4db38d3115ed60da621e012c0efc0172aae_368_401
Which results in the follow error:
The
dnn/fargan_data.h
is a generated file, resulted from the pre-training commands using Python command, this is a pre-step, before building, something hard to be managed: https://gitlab.xiph.org/xiph/opus/-/blob/v1.5.2/dnn/torch/fargan/README.md#L37As those options are OFF by default, even in the project (https://gitlab.xiph.org/xiph/opus/-/blob/v1.5.2/CMakeLists.txt#L86) we don't see it, but it's the scenario that will result in new issues for CCI in the future.