GithubHelp home page GithubHelp logo

Comments (8)

Apteryks avatar Apteryks commented on June 9, 2024 1

Tested OK! Thank you.

from restinio.

eao197 avatar eao197 commented on June 9, 2024

Hi!

Can you check the latest commit from 0.7-dev-0.7.2-issue-208 branch? It's necessary to specify -DRESTINIO_DEP_CATCH2=find to the CMake configure (like here: https://github.com/Stiffstream/restinio-dockerfiles/blob/7b511213325091ad040b678bd2e0ea4ef18a714f/v0.7/archlinux-gcc-system-catch2.Dockerfile#L43-L44).

If it will work for you then I'll make a similar fix for #207.

from restinio.

Apteryks avatar Apteryks commented on June 9, 2024

Hi! It worked with -DRESTINIO_DEP_CATCH2=find, but not with -DRESTINIO_DEP_CATCH2=system. Perhaps it should, for uniformity with the other RESTINIO_DEP_* options?

Thank you!

from restinio.

eao197 avatar eao197 commented on June 9, 2024

I'm afraid that -DRESTINIO_DEP_CATCH2=system won't work because it's necessary to do include(Catch) in the root CMakeLists.txt and it seems that include(Catch) will work only after find_package(Catch2) or add_subdirectory(catch2).

from restinio.

Apteryks avatar Apteryks commented on June 9, 2024

Is there a benefit to separating 'find' and 'system'? From my user perspective, I'm not sure what it means; I'm always interested in using system libraries; I guess three uses cases could be:

  1. Enforce system library used (my use case)
  2. Use system, but fallback to bundled library if not found
  3. Use bundled library.

Is 'find' # 2 above?

from restinio.

eao197 avatar eao197 commented on June 9, 2024

The system is for cases when a library is already installed in the system and there is no need to detect include/library paths.

The find is for cases when a non-system package management is used (like vcpkg/conan or something similar).

The local is for cases when something like git submodules, CMake's fetch_content or MxxRu::externals is used for managing dependencies.

Because sometimes CMake's find_package can find a system-wide library, the find option could be used for searching a library installed in the system.

The problem with Catch2 is that we need not only to find Catch2's header files and Catch2's .a/.lib files, but also use CMake's catch_discover_tests command (for that purpose include(Catch) is used in CMakeLists.txt).

from restinio.

Apteryks avatar Apteryks commented on June 9, 2024

Hi, and thanks for explaining. That's a very featureful library detection/fallback system! I guess -DRESTINIO_DEP_CATCH2=find can be fine, although I suspect some users may stumble upon trying -DRESTINIO_DEP_CATCH2=system.

Thank you!

from restinio.

eao197 avatar eao197 commented on June 9, 2024

The fix is now a part of v.0.7.2. Fill free to reopen the issue if something goes wrong for you.

from restinio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.