vsomeip icon indicating copy to clipboard operation
vsomeip copied to clipboard

reported VSOMEIP_BOOST_VERSION donest match CMakeLists check

Open jsrivaya opened this issue 3 years ago • 0 comments
trafficstars

Boost version properly assigned using this code

# cmake 3.15 introduced a new variable and a new format for the old one
if (DEFINED Boost_VERSION_MACRO)
  set(VSOMEIP_BOOST_VERSION ${Boost_VERSION_MACRO})
else()
  set(VSOMEIP_BOOST_VERSION ${Boost_VERSION})
endif()
message( STATUS "Using boost version: ${VSOMEIP_BOOST_VERSION}" )

output: -- Using boost version: 1.74.0

But the control of version to select the helper uses wrong format, it always defaults to 1.55

if (${VSOMEIP_BOOST_VERSION} GREATER 107400)
message( ERROR "boost version ${VSOMEIP_BOOST_VERSION} is not (yet) supported. Latest supported version is 1.74.0" )
elseif(${VSOMEIP_BOOST_VERSION} GREATER 107300)
set(VSOMEIP_BOOST_HELPER implementation/helper/1.74)
elseif(${VSOMEIP_BOOST_VERSION} GREATER 106999)
set(VSOMEIP_BOOST_HELPER implementation/helper/1.70)
elseif(${VSOMEIP_BOOST_VERSION} GREATER 106599)
set(VSOMEIP_BOOST_HELPER implementation/helper/1.66)
else()
set(VSOMEIP_BOOST_HELPER implementation/helper/1.55)
endif()
message(STATUS "USING VSOMEIP_BOOST_HELPER=" ${VSOMEIP_BOOST_HELPER})

output: -- USING VSOMEIP_BOOST_HELPER=implementation/helper/1.55

I am using conan for package and dependency management. I have boost 1.74. I have to hardcode the 1.74 version after the previous loop for it to work

jsrivaya avatar Sep 21 '22 19:09 jsrivaya