aws-samples / aws-iot-securetunneling-localproxy

AWS Iot Secure Tunneling local proxy reference C++ implementation
https://docs.aws.amazon.com/iot/latest/developerguide/what-is-secure-tunneling.html
Apache License 2.0
73 stars 70 forks source link

Add BUILD_TESTS option to cmake and downgrade dependency versions #94

Open jimmylomro opened 1 year ago

jimmylomro commented 1 year ago

Motivation

Modifications

Change summary

Please describe what changes are included in this pull request:

Revision diff summary

If there is more than one revision, please explain what has been changed since the last revision.

Testing

Is your change tested? If not, please justify the reason.: I did not test because only the method changed Please list your testing steps and test results.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

jimmylomro commented 1 year ago

Second commit adds an install directive and a couple of explicit includes. These includes might be available on newer versions of Boost or Protobuf headers, but on the downgraded versions they seem to not be included.

Also in case this is useful, the oldest breaking change in Protobuf happened in version v3.4.0 (introduction of ByteSizeLong method), and the latest breaking change in Boost is the introduction of the beast library in 1.66.0. So these are possibly the oldest REQUIRED versions of these packages.

RogerZhongAWS commented 1 year ago

Hello! Thank you for doing the research and for making this change. We recently released a new version of the localproxy, so we will need to test these older dependency versions with the updated source code. Please hang tight.

Regards, Roger

RogerZhongAWS commented 1 year ago

May I suggest we set the package version as a property and parameterize it like this? Instead of: find_package(Protobuf 3.6.1 REQUIRED) We do: set_property(GLOBAL PROPERTY PROTOBUF_PKG_VERSION 3.17.3) find_package(Protobuf ${PROTOBUF_PKG_VERSION} REQUIRED)

and same thing for boost respectively.

That way, we can update our documentation to say setting -DPROTOBUF_PKG_VERSION is up to the user but not guaranteed to work past a certain version.