smanders / externpro

build external projects with cmake
MIT License
13 stars 12 forks source link

update azmq #366

Closed smanders closed 1 year ago

smanders commented 2 years ago

azmq was added to externpro https://github.com/smanders/externpro/issues/321 2021.06 it was patched https://github.com/smanders/externpro/issues/340 2022.03

a branch (xp21.06.02 https://github.com/smanders/azmq/tree/xp21.06.02) was created off 21.06.02 commit

that particular "release" of azmq uses boost::regex and there is a Fortify finding with it

$ grep -r include | grep boost/regex
azmq/detail/socket_ops.hpp:#include <boost/regex.hpp>

updating to a later commit and branching off for patches "fixes" the Fortify finding because it uses std regex instead!

smanders commented 2 years ago

xp21.06.02 patch/commits https://github.com/zeromq/azmq/compare/fc6b42acaaeaa65692e031d796a02011d2924713...smanders:azmq:xp21.06.02

xp21.12.05 patch/commits https://github.com/zeromq/azmq/compare/e0058a38976399006f535a9010d29e763b43fcd8...smanders:azmq:xp21.12.05

one commit from xp21.06.02 https://github.com/zeromq/azmq/commit/c23d2c45fb241f6619395d3f39c82091c6d50170 was dropped from the xp21.12.05 changes...

smanders commented 2 years ago

completed with commit to dev branch referenced above

smanders commented 2 years ago

diff from the 21.06.02 commit to the 2021.12.05 commit https://github.com/zeromq/azmq/compare/fc6b42acaaeaa65692e031d796a02011d2924713...e0058a38976399006f535a9010d29e763b43fcd8

there's a new cmake warning

-- Found boost: 1.76.0 [externpro]
-- Found Threads: TRUE
-- Found sodium: 21.11.18 [externpro]
-- Found libzmq: 4.3.4 [externpro]
CMake Warning at test/CMakeLists.txt:1 (find_package):
  By not providing "FindCatch2.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Catch2", but
  CMake did not find one.

  Could not find a package configuration file provided by "Catch2" with any
  of the following names:

    Catch2Config.cmake
    catch2-config.cmake

  Add the installation prefix of "Catch2" to CMAKE_PREFIX_PATH or set
  "Catch2_DIR" to a directory containing one of the above files.  If "Catch2"
  provides a separate development package or SDK, be sure it has been
  installed.

-- Configuring done
-- Generating done
smanders commented 2 years ago

it appears Catch2 is automatically downloaded and built

find_package(Catch2)
if ( NOT Catch2 )
    Include(FetchContent)
    FetchContent_Declare(
            Catch2
            GIT_REPOSITORY https://github.com/catchorg/Catch2.git
            GIT_TAG        v2.13.7)
    FetchContent_MakeAvailable(Catch2)
    list(APPEND CMAKE_MODULE_PATH ${catch2_SOURCE_DIR}/contrib)
endif()
smanders@bppro22-05:/bpvol/externpro/_bld/xpbase/Build/azmq_Release (dev)
$ ls _deps/*
_deps/catch2-build:
CMakeFiles  CTestTestfile.cmake  Makefile  cmake_install.cmake

_deps/catch2-src:
BUILD.bazel  CMakeLists.txt      LICENSE.txt  WORKSPACE     artwork      conanfile.py  docs      include  projects  single_include  third_party
CMake        CODE_OF_CONDUCT.md  README.md    appveyor.yml  codecov.yml  contrib       examples  misc     scripts   src

_deps/catch2-subbuild:
CMakeCache.txt  CMakeFiles  CMakeLists.txt  Makefile  catch2-populate-prefix  cmake_install.cmake

however, I believe this would fail an "offline" build of externpro... so I'm deciding whether this is a feature of externpro I still want to keep (support for building without an internet connection) or if I will disable the unit tests of azmq or make Catch2 another project in externpro

smanders commented 1 year ago

I'll deal with the ability to do an offline build of externpro in the future, if this becomes something needed again