Giter Club home page Giter Club logo

Comments (7)

aminya avatar aminya commented on May 29, 2024 1

The example in the readme is updated. Now, the FEATURE_TESTS option handles the sanitizer flag exports.

from project_options.

aminya avatar aminya commented on May 29, 2024

This is impossible in CMake. The interface libraries cannot have private dependencies.

from project_options.

ClausKlein avatar ClausKlein commented on May 29, 2024

This is impossible in CMake. The interface libraries cannot have private dependencies.

I know, but if you install this interface, it is also impossible to use this header only lib without project_options!

from project_options.

aminya avatar aminya commented on May 29, 2024

We should also install project_options for header-only libraries.

from project_options.

aminya avatar aminya commented on May 29, 2024

Well, I don't think we actually need this. package_project already generates the project_options and project_warnings targets:

Running test_install, then looking at myprojTargets.cmake:

image

from project_options.

ClausKlein avatar ClausKlein commented on May 29, 2024

If I use a header only lib i.e. boost::asio I will not import there development setting like:

--coverage

-Wpedantic -Werror... or

the worst case: g++ specific warnings, if I want to use clang++

I created this issue to show it is a wrong usage of project_options to export the project_options for every installed lib, independent of it is an interface or a normal lib!

from project_options.

aminya avatar aminya commented on May 29, 2024

The config files generated by CMake are not portable! They have absolute paths in them, and they are generated based on the options you pass to project_options.

To avoid having test/sanitizer-related flags in the generated config, you should use FEATURE_TESTS flag.

https://github.com/cpp-best-practices/cpp_vcpkg_project/blob/830685f328fba4bbdcfb0540d0fbcecd95aaab5c/CMakeLists.txt#L30-L48

I will add this to the readme if it is not clear.

from project_options.

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.