Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-25181

Autotest/catch2 support for __has_include

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • Qt Creator 4.13.2, Qt Creator 4.14.1
    • Test Integration
    • None

    Description

      To support either system wide or bundled catch dep I use this code fragment:

      #if __has_include(<catch2/catch.hpp>)
      #include <catch2/catch.hpp>
      #else
      #include <catch.hpp>
      #endif

      Moving #include <catch2/catch.hpp> outside of __has_include works immediately. 

      It seems that autotest plugin doesn't support this. I don't know if this could be easily fixed with current code parser, is it just that C++17 isn't enabled? 

      I get this issue with both CMake and Meson plugin as project managers.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            cstenger Christian Stenger
            ajeandet Alexis Jeandet
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes