public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: HHN <harihara.sn@gmail.com>
Cc: gcc-help@gcc.gnu.org
Subject: Re: Errors when trying to use C++ modules with cmake and GCC
Date: Wed, 1 Feb 2023 11:00:55 +0000	[thread overview]
Message-ID: <CAH6eHdQcn4UjNBPOquGwCif-YA6HXe4G+Eik50vofZmkJeJrBw@mail.gmail.com> (raw)
In-Reply-To: <CAG6c7rWbA1itLS=LzSeWNwGpWZX=wcMdy6rxwc5-52wgB5sotg@mail.gmail.com>

On Wed, 1 Feb 2023 at 10:53, HHN via Gcc-help <gcc-help@gcc.gnu.org> wrote:
>
> I have been working on upgrading the HPX build system to support C++
> modules, while trying to experiment with GCC support for C++ modules, I
> keep running into this issue of unrecognized command-line options.
>
> `
> g++: error: unrecognized command-line option
> ‘-fdep-file=CMakeFiles/std_module_example.dir/t3.cxx.o.ddi’
> g++: error: unrecognized command-line option
> ‘-fdep-output=CMakeFiles/std_module_example.dir/t3.cxx.o’
> g++: error: unrecognized command-line option ‘-fdep-format=trtbd’

[...]

> I have tried this with g++ 11.3, g++ 12.1 installed using ubuntu package
> managers,

As you were told in the cmake forum by Ben B., the patches to add
-fdep-file etc. are not yet in GCC, so of course it doesn't work with
releases from more than a year ago.

> I have also tried the same using this certain patch
> <https://github.com/mathstuf/gcc/tree/p1689r5> as suggested by the user on
> an online forum
> <https://discourse.cmake.org/t/module-support-for-g-and-clang/7367/2>.

That user is the person who wrote the patch to add -fdep-file, so you
should listen to them. If it still doesn't work with that patch, then
you probably didn't apply the patch correctly.

> I have also tried the same using the master
> <https://github.com/gcc-mirror/gcc> and devel/c++-modules
> <https://github.com/gcc-mirror/gcc/tree/devel/c++-modules> branch on gcc
> repo.

Obviously it's not going to work with those branches, because the
patches to add -fdep-file support are not part of GCC yet, as Ben B.
already told you.

> All of them have given the same errors. Also the devel/c++-modules branch
> compiles to g++ version of g++ (GCC) 11.0.0 20210203 (experimental)
> [c++-modules revision 20230201-1505], while the master branch has
> version g++ (GCC) 13.0.1 20230201 (experimental).

Don't use the devel/c++-modules branch. It was used two+ years ago for
the initial work on modules, but the master branch now has all that
work and numerous improvements.

  reply	other threads:[~2023-02-01 11:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-01 10:52 HHN
2023-02-01 11:00 ` Jonathan Wakely [this message]
2023-02-08  9:48   ` HHN
2023-02-08 10:35     ` Jonathan Wakely
2023-02-08 12:14       ` HHN
2023-02-08 12:27         ` Jonathan Wakely
2023-02-08 12:32           ` Jonathan Wakely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAH6eHdQcn4UjNBPOquGwCif-YA6HXe4G+Eik50vofZmkJeJrBw@mail.gmail.com \
    --to=jwakely.gcc@gmail.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=harihara.sn@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).