GithubHelp home page GithubHelp logo

Comments (4)

horenmar avatar horenmar commented on June 11, 2024

Why does the compilation fail there? Is this a hard error?

from catch2.

morinmorin avatar morinmorin commented on June 11, 2024

Yes, that's hard errors. For example, on mac with the latest developer tools, this

echo '#include <catch2/catch_all.hpp>' | g++-13 -xc++ -

produces the following error messages

In file included from catch2/internal/catch_platform.hpp:14,
                 from catch2/internal/catch_compiler_capabilities.hpp:27,
                 from catch2/benchmark/catch_benchmark.hpp:14,
                 from catch2/benchmark/catch_benchmark_all.hpp:24,
                 from catch2/catch_all.hpp:25,
                 from <stdin>:1:
/usr/include/TargetConditionals.h:140:50: error: missing binary operator before token "("
  140 | #if !defined(__has_extension) || !__has_extension(define_target_os_macros)

The code !__has_extension(define_target_os_macros) causes compilation failure, because __has_extension is not supported/defined on GCC (until the next release of GCC).

from catch2.

horenmar avatar horenmar commented on June 11, 2024

Hmmm, yeah there was a reason why we are checking headers like this

#if defined(__has_include)
  #if __has_include(<string_view>) && defined(CATCH_CPP17_OR_GREATER)

I'll accept a PR that adds the workaround.

from catch2.

morinmorin avatar morinmorin commented on June 11, 2024

Thanks. I'll submit PR later.

from catch2.

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.