Marcus Asteborg
2019-Apr-02 23:15 UTC
[opus] CMake support for Opus proposal (in addition to Autotools)
Right that I had completely missed, I have added the files and verified that it builds with CMake from the tar on Linux (out of the git repo) I am parsing the package_version file from the tarball if it exists so it should maintain the version info. //Marcus ________________________________ From: Jean-Marc Valin <jmvalin at jmvalin.ca> Sent: Tuesday, April 2, 2019 11:38 To: Marcus Asteborg; opus at xiph.org Subject: Re: [opus] CMake support for Opus proposal (in addition to Autotools) Thanks, it applies now. I think you'd also want to add some (all?) of these files to EXTRA_DIST in Makefile.am, otherwise your cmake files won't be included in release tarballs, which are generate using "make dist". To test, you should try running run "make dist" to generate a tarball yourself. From there, you try building the contents with your cmake files and see if it works. Cheers, Jean-Marc On 04/02/2019 11:26 AM, Marcus Asteborg wrote:> Hi, > > Thanks for the quick feedback I have changed the name to avoid conflict. > > Attached is the updated patch. > > //Marcus > ------------------------------------------------------------------------ > *From:* Jean-Marc Valin <jmvalin at jmvalin.ca> > *Sent:* Tuesday, April 2, 2019 00:07 > *To:* Marcus Asteborg; opus at xiph.org > *Subject:* Re: [opus] CMake support for Opus proposal (in addition to > Autotools) > > Hi Marcus, > > There seems to be a conflict between the autotools-created config.h.in > and the same file added by your patch. Any way you can use use a > different name? > > Cheers, > > Jean-Marc > > On 04/02/2019 01:39 AM, Marcus Asteborg wrote: >> Hi, >> >> >> Here is a proposal for adding CMake in addition of Autotools. >> >> >> See the attached patch for changes or the pull request here: >> eur01.safelinks.protection.outlook.com/?url=https://github.com/xiph/opus/pull/100&data=02|01||83448751302e4bd85a8908d6b79a58ab|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|636898270884177946&sdata=Ed139jcES0woXrPabecRjGq7vGrnvpZJkRBQ8ty86Ys=&reserved=0 >> <eur01.safelinks.protection.outlook.com/?url=https://github.com/xiph/opus/pull/100&data=02|01||83448751302e4bd85a8908d6b79a58ab|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|636898270884187957&sdata=a50Uz9L4XicAFm82I0J1RvorD42Bg9SXxMxIGmSpJSw=&reserved=0> >> >> >> The CMake scripts are parsing the filelist from Autotools, so only one >> file list needs to be maintained. >> >> >> With this change the checked in Visual Studio solution can be removed >> and no longer need to be maintained and updated when Visual Studio is >> updated. >> >> >> For related discussion about CMake support see >> eur01.safelinks.protection.outlook.com/?url=https://github.com/xiph/opus/pull/37&data=02|01||83448751302e4bd85a8908d6b79a58ab|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|636898270884187957&sdata=5IvhQfm5HjZZYF9eOfapg7VH7X0AWLcXnCyYmJYG848=&reserved=0 > <eur01.safelinks.protection.outlook.com/?url=https://github.com/xiph/opus/pull/37&data=02|01||83448751302e4bd85a8908d6b79a58ab|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|636898270884187957&sdata=5IvhQfm5HjZZYF9eOfapg7VH7X0AWLcXnCyYmJYG848=&reserved=0> >> >> >> For any concerns, comments or questions regarding the change please >> comment in the pull request, reply to this thread or send me an e-mail. >> >> >> Related Issue: >> >> eur01.safelinks.protection.outlook.com/?url=https://github.com/xiph/opus/issues/85&data=02|01||83448751302e4bd85a8908d6b79a58ab|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|636898270884187957&sdata=z2POz2d0rUDPwTSMov7BD6qQyUl25cRCBIRJpzsK8d4=&reserved=0 >> <eur01.safelinks.protection.outlook.com/?url=https://github.com/xiph/opus/issues/85&data=02|01||83448751302e4bd85a8908d6b79a58ab|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|636898270884187957&sdata=z2POz2d0rUDPwTSMov7BD6qQyUl25cRCBIRJpzsK8d4=&reserved=0> >> >> >> //Marcus >> >> >> >> >> _______________________________________________ >> opus mailing list >> opus at xiph.org >> eur01.safelinks.protection.outlook.com/?url=http://lists.xiph.org/mailman/listinfo/opus&data=02|01||83448751302e4bd85a8908d6b79a58ab|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|636898270884197962&sdata=szVFXlIfbQD/L6OMWEonuysnYQo46vSjJ/cIgh2ahsc=&reserved=0 >>-------------- next part -------------- An HTML attachment was scrubbed... URL: <lists.xiph.org/pipermail/opus/attachments/20190402/bb037215/attachment-0001.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: 0003-Adding-CMake-support-for-Windows-Mac-Linux-and-Andro.patch Type: application/octet-stream Size: 30476 bytes Desc: 0003-Adding-CMake-support-for-Windows-Mac-Linux-and-Andro.patch URL: <lists.xiph.org/pipermail/opus/attachments/20190402/bb037215/attachment-0001.obj>
Jean-Marc Valin
2019-Apr-10 21:52 UTC
[opus] CMake support for Opus proposal (in addition to Autotools)
Hi, It looks like cmake currently defaults to no optimization, which I think is a bit unexpected for most users. I don't know how to do that in cmake, but it would be good to default to a "release" build with optimizations. Can you have a patch to do that? Also, is there a way to manually add flags to the compiler (like setting CFLAGS with autotools)? Cheers, Jean-Marc On 04/02/2019 07:15 PM, Marcus Asteborg wrote:> Right that I had completely missed, I have added the files and verified > that it builds with CMake from the tar on Linux (out of the git repo) > > I am parsing the package_version file from the tarball if it exists so > it should maintain the version info. > > //Marcus > > > ------------------------------------------------------------------------ > *From:* Jean-Marc Valin <jmvalin at jmvalin.ca> > *Sent:* Tuesday, April 2, 2019 11:38 > *To:* Marcus Asteborg; opus at xiph.org > *Subject:* Re: [opus] CMake support for Opus proposal (in addition to > Autotools) > > Thanks, it applies now. I think you'd also want to add some (all?) of > these files to EXTRA_DIST in Makefile.am, otherwise your cmake files > won't be included in release tarballs, which are generate using "make > dist". To test, you should try running run "make dist" to generate a > tarball yourself. From there, you try building the contents with your > cmake files and see if it works. > > Cheers, > > Jean-Marc > > On 04/02/2019 11:26 AM, Marcus Asteborg wrote: >> Hi, >> >> Thanks for the quick feedback I have changed the name to avoid conflict. >> >> Attached is the updated patch. >> >> //Marcus >> ------------------------------------------------------------------------ >> *From:* Jean-Marc Valin <jmvalin at jmvalin.ca> >> *Sent:* Tuesday, April 2, 2019 00:07 >> *To:* Marcus Asteborg; opus at xiph.org >> *Subject:* Re: [opus] CMake support for Opus proposal (in addition to >> Autotools) >> >> Hi Marcus, >> >> There seems to be a conflict between the autotools-created config.h.in >> and the same file added by your patch. Any way you can use use a >> different name? >> >> Cheers, >> >> Jean-Marc >> >> On 04/02/2019 01:39 AM, Marcus Asteborg wrote: >>> Hi, >>> >>> >>> Here is a proposal for adding CMake in addition of Autotools. >>> >>> >>> See the attached patch for changes or the pull request here: >>> eur01.safelinks.protection.outlook.com/?url=https://github.com/xiph/opus/pull/100&data=02|01||83448751302e4bd85a8908d6b79a58ab|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|636898270884177946&sdata=Ed139jcES0woXrPabecRjGq7vGrnvpZJkRBQ8ty86Ys=&reserved=0 >>> <eur01.safelinks.protection.outlook.com/?url=https://github.com/xiph/opus/pull/100&data=02|01||83448751302e4bd85a8908d6b79a58ab|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|636898270884187957&sdata=a50Uz9L4XicAFm82I0J1RvorD42Bg9SXxMxIGmSpJSw=&reserved=0> >>> >>> >>> The CMake scripts are parsing the filelist from Autotools, so only one >>> file list needs to be maintained. >>> >>> >>> With this change the checked in Visual Studio solution can be removed >>> and no longer need to be maintained and updated when Visual Studio is >>> updated. >>> >>> >>> For related discussion about CMake support see >>> eur01.safelinks.protection.outlook.com/?url=https://github.com/xiph/opus/pull/37&data=02|01||83448751302e4bd85a8908d6b79a58ab|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|636898270884187957&sdata=5IvhQfm5HjZZYF9eOfapg7VH7X0AWLcXnCyYmJYG848=&reserved=0 >> <eur01.safelinks.protection.outlook.com/?url=https://github.com/xiph/opus/pull/37&data=02|01||83448751302e4bd85a8908d6b79a58ab|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|636898270884187957&sdata=5IvhQfm5HjZZYF9eOfapg7VH7X0AWLcXnCyYmJYG848=&reserved=0> >>> >>> >>> For any concerns, comments or questions regarding the change please >>> comment in the pull request, reply to this thread or send me an e-mail. >>> >>> >>> Related Issue: >>> >>> eur01.safelinks.protection.outlook.com/?url=https://github.com/xiph/opus/issues/85&data=02|01||83448751302e4bd85a8908d6b79a58ab|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|636898270884187957&sdata=z2POz2d0rUDPwTSMov7BD6qQyUl25cRCBIRJpzsK8d4=&reserved=0 >>> <eur01.safelinks.protection.outlook.com/?url=https://github.com/xiph/opus/issues/85&data=02|01||83448751302e4bd85a8908d6b79a58ab|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|636898270884187957&sdata=z2POz2d0rUDPwTSMov7BD6qQyUl25cRCBIRJpzsK8d4=&reserved=0> >>> >>> >>> //Marcus >>> >>> >>> >>> >>> _______________________________________________ >>> opus mailing list >>> opus at xiph.org >>> eur01.safelinks.protection.outlook.com/?url=http://lists.xiph.org/mailman/listinfo/opus&data=02|01||83448751302e4bd85a8908d6b79a58ab|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|636898270884197962&sdata=szVFXlIfbQD/L6OMWEonuysnYQo46vSjJ/cIgh2ahsc=&reserved=0 >>>
Marcus Asteborg
2019-Apr-10 23:41 UTC
[opus] CMake support for Opus proposal (in addition to Autotools)
Hi, Thanks for the feedback, attached is patch with default buildtype set to release. Also fixed the issues Mark pointed out especially CUSTOM_MODES was a bug that has been fixed and added custom_demo as a program when this is enabled. For setting CFLAGS see the following: stackoverflow.com/questions/10085945/set-cflags-and-cxxflags-options-using-cmake [cdn.sstatic.net/Sites/stackoverflow/img/apple-touch-icon at 2.png?v=73d79a89bded]<stackoverflow.com/questions/10085945/set-cflags-and-cxxflags-options-using-cmake> Set CFLAGS and CXXFLAGS options using CMake - Stack Overflow<stackoverflow.com/questions/10085945/set-cflags-and-cxxflags-options-using-cmake> If you want a debuggable build, just do a debug configure at the command line. "cmake -DCMAKE_BUILD_TYPE=Debug". The resulting build will have the debug flags on for the given build system. stackoverflow.com export CFLAGS=-ggdb export CXXFLAGS=-ggdb github.com/xiph/opus/pull/117 [avatars0.githubusercontent.com/u/8365509?s=400&v=4]<github.com/xiph/opus/pull/117> CMake changes - Make release build default, made CUSTOM_MODE an optio… by xnorpx · Pull Request #117 · xiph/opus<github.com/xiph/opus/pull/117> CMake changes - Make release build default, made CUSTOM_MODE an option with default off and added missing buildflags for Linux and security. github.com //Marcus ________________________________ From: Jean-Marc Valin <jmvalin at jmvalin.ca> Sent: Wednesday, April 10, 2019 14:52 To: Marcus Asteborg; opus at xiph.org Subject: Re: [opus] CMake support for Opus proposal (in addition to Autotools) Hi, It looks like cmake currently defaults to no optimization, which I think is a bit unexpected for most users. I don't know how to do that in cmake, but it would be good to default to a "release" build with optimizations. Can you have a patch to do that? Also, is there a way to manually add flags to the compiler (like setting CFLAGS with autotools)? Cheers, Jean-Marc On 04/02/2019 07:15 PM, Marcus Asteborg wrote:> Right that I had completely missed, I have added the files and verified > that it builds with CMake from the tar on Linux (out of the git repo) > > I am parsing the package_version file from the tarball if it exists so > it should maintain the version info. > > //Marcus > > > ------------------------------------------------------------------------ > *From:* Jean-Marc Valin <jmvalin at jmvalin.ca> > *Sent:* Tuesday, April 2, 2019 11:38 > *To:* Marcus Asteborg; opus at xiph.org > *Subject:* Re: [opus] CMake support for Opus proposal (in addition to > Autotools) > > Thanks, it applies now. I think you'd also want to add some (all?) of > these files to EXTRA_DIST in Makefile.am, otherwise your cmake files > won't be included in release tarballs, which are generate using "make > dist". To test, you should try running run "make dist" to generate a > tarball yourself. From there, you try building the contents with your > cmake files and see if it works. > > Cheers, > > Jean-Marc > > On 04/02/2019 11:26 AM, Marcus Asteborg wrote: >> Hi, >> >> Thanks for the quick feedback I have changed the name to avoid conflict. >> >> Attached is the updated patch. >> >> //Marcus >> ------------------------------------------------------------------------ >> *From:* Jean-Marc Valin <jmvalin at jmvalin.ca> >> *Sent:* Tuesday, April 2, 2019 00:07 >> *To:* Marcus Asteborg; opus at xiph.org >> *Subject:* Re: [opus] CMake support for Opus proposal (in addition to >> Autotools) >> >> Hi Marcus, >> >> There seems to be a conflict between the autotools-created config.h.in >> and the same file added by your patch. Any way you can use use a >> different name? >> >> Cheers, >> >> Jean-Marc >> >> On 04/02/2019 01:39 AM, Marcus Asteborg wrote: >>> Hi, >>> >>> >>> Here is a proposal for adding CMake in addition of Autotools. >>> >>> >>> See the attached patch for changes or the pull request here: >>> eur04.safelinks.protection.outlook.com/?url=https://github.com/xiph/opus/pull/100&data=02|01||fbf5c4691fe9442ae77108d6bdfedbfe|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|636905299639197576&sdata=sV5Oy0hrlLtp558MUVMMixMG5IJ7oN91JndXbqcSX8M=&reserved=0 >>> <eur04.safelinks.protection.outlook.com/?url=https://github.com/xiph/opus/pull/100&data=02|01||fbf5c4691fe9442ae77108d6bdfedbfe|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|636905299639197576&sdata=sV5Oy0hrlLtp558MUVMMixMG5IJ7oN91JndXbqcSX8M=&reserved=0> >>> >>> >>> The CMake scripts are parsing the filelist from Autotools, so only one >>> file list needs to be maintained. >>> >>> >>> With this change the checked in Visual Studio solution can be removed >>> and no longer need to be maintained and updated when Visual Studio is >>> updated. >>> >>> >>> For related discussion about CMake support see >>> eur04.safelinks.protection.outlook.com/?url=https://github.com/xiph/opus/pull/37&data=02|01||fbf5c4691fe9442ae77108d6bdfedbfe|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|636905299639197576&sdata=LB2DZZTnqoy8WmhrVX/05ZhxJe2MfayOrega2jrHV6c=&reserved=0 >> <eur04.safelinks.protection.outlook.com/?url=https://github.com/xiph/opus/pull/37&data=02|01||fbf5c4691fe9442ae77108d6bdfedbfe|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|636905299639207584&sdata=A2KqC8trMHYgr9hRolbQiQHrma6sTx4RhtJb7eA6Eu8=&reserved=0> >>> >>> >>> For any concerns, comments or questions regarding the change please >>> comment in the pull request, reply to this thread or send me an e-mail. >>> >>> >>> Related Issue: >>> >>> eur04.safelinks.protection.outlook.com/?url=https://github.com/xiph/opus/issues/85&data=02|01||fbf5c4691fe9442ae77108d6bdfedbfe|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|636905299639207584&sdata=tl5TJEQTx1LaRrVZ0HhUPhKyZcPIQdSj2p0uYgMUjEw=&reserved=0 >>> <eur04.safelinks.protection.outlook.com/?url=https://github.com/xiph/opus/issues/85&data=02|01||fbf5c4691fe9442ae77108d6bdfedbfe|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|636905299639207584&sdata=tl5TJEQTx1LaRrVZ0HhUPhKyZcPIQdSj2p0uYgMUjEw=&reserved=0> >>> >>> >>> //Marcus >>> >>> >>> >>> >>> _______________________________________________ >>> opus mailing list >>> opus at xiph.org >>> eur04.safelinks.protection.outlook.com/?url=http://lists.xiph.org/mailman/listinfo/opus&data=02|01||fbf5c4691fe9442ae77108d6bdfedbfe|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|636905299639207584&sdata=w3BgyhzEKP7WhsnNiaVE02mJZ5JEuj6SKe6rU6EG3y0=&reserved=0 >>>-------------- next part -------------- An HTML attachment was scrubbed... URL: <lists.xiph.org/pipermail/opus/attachments/20190410/d46e0757/attachment-0001.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-CMake-changes-Make-release-build-default-made-CUSTOM.patch Type: application/octet-stream Size: 6977 bytes Desc: 0001-CMake-changes-Make-release-build-default-made-CUSTOM.patch URL: <lists.xiph.org/pipermail/opus/attachments/20190410/d46e0757/attachment-0001.obj>