cmake-conan icon indicating copy to clipboard operation
cmake-conan copied to clipboard

Added conan.cmake file version check & download error reporting

Open jlschrag opened this issue 2 years ago • 5 comments

The current version of the conan.cmake file download in the readme is just a simple check that the file exists. This is problematic if a developer has an outdated version of the file present on their machine and can result in vague error messages later in the process. I've added logic to parse the version number from the file present on their machine and compare with the version in their CMakeLists.txt.

I've also added logic to catch file download errors as errors were previously either ignored or a misleading error message was shown.

Finally, I've updated the conan.cmake file version number to 0.17.0 avoid errors for Visual Studio 2022 users following the readme.

Note: This is a large block of code for a readme. If there is a better place to put it, please let me know.

jlschrag avatar Nov 30 '21 20:11 jlschrag

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Nov 30 '21 20:11 CLAassistant

@prince-chrismc Are you saying the CONAN_WRAPPER definition should be added elsewhere in the README?

jlschrag avatar Dec 05 '21 04:12 jlschrag

Yes a personal preference, the first example should be easy/most simple.

There's no need to make any changes.

prince-chrismc avatar Dec 05 '21 06:12 prince-chrismc

@prince-chrismc Is this waiting for me to add CONAN_WRAPPER before merge?

jlschrag avatar Jan 03 '22 16:01 jlschrag

I am not on the Conan team, and they are very busy with the near v2 release.

Last time I said "no needed for changes" so we just need to wait for them to attack this project as well :)

prince-chrismc avatar Jan 03 '22 20:01 prince-chrismc