From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by sourceware.org (Postfix) with ESMTPS id 8919A3858D37 for ; Wed, 1 Feb 2023 10:52:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8919A3858D37 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-x62b.google.com with SMTP id hx15so30645945ejc.11 for ; Wed, 01 Feb 2023 02:52:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=Jo3Bnm+vTyYDnDkeHDQAwnBz7kdYfIJuhzMSGQ8b/9E=; b=EXsBqQkSmB9WHNRb6lJpfc0yZQ3C2EckDYtBnGQb6VAzKYvotbGuLTTTIOsx1pXHME entpGSoxAsEcXpl3Wq9PAHXQxRxQRCKwZ6w/Xotb+8aIlnbSavb5S12PRewojsAt9YWR GAc+G6DAr6oE4g2oejkttdlt2nX4ij8W6WmzdOheKh/aY/R714q5is4kfaFV1SlTDmsi /lo6EeD9wzgarU+RzoDXyu1Da8bjswxXSPKsqTszGhqwAI7atUbE8jMiiBs05kjj98ks /VNtzhRjThQ9jSahokER9bfE4JBEuH5z4jw/liLINJKCFwGzbVQPV2NgXG9nomyp84lB p/iA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Jo3Bnm+vTyYDnDkeHDQAwnBz7kdYfIJuhzMSGQ8b/9E=; b=Qc3KU5GVBKY2wVJ2JfllX9G68nZvKbDXyvT3M4QGSiXqouhPgG144XbCUXpEHj2Eku shxYcjOlPmDSTnPXPr36PMYeGGXfetrOg7OjmcNUGsxahOjJGUsLaUswN2NKfpACgSGA DCRsAHlDroCvwLG4PBeI8OdKRcrHshbpQuKNOzQxmU/QKfve+wh3QxD9gW3WcxzTfCSD GVJD4U8RGsZWyCf5ugZ2HziK41F/8BMp6OuFKko/LhFwYbpVbR2WDunV3SVTZ0yeu9bC S8hMTJjIQcwWwaoJ7swEJnnYECdbyeCxYHHSlYi5o1UICQCOjOnn/Ds5CFiXZ2qXLBhr NS2w== X-Gm-Message-State: AO0yUKWXNJh4pcFXSPSEGqn70A/3IE22BdnjVZq6r8O0jO5dX/5C8I4j z0CLGGTmZ6nL3QiLIqqdFDxBuvUepIQp2hBxUdLqlVuALIO8CA== X-Google-Smtp-Source: AK7set9xFtsxjEBhDU1nI/H+OwTc4VH7MuPD0b6vbbfXK2loCnEs/T7Rat2g8fRLIoT/g15qPH9yNyf9JMUEVJf+hSw= X-Received: by 2002:a17:907:2163:b0:887:ce5c:af67 with SMTP id rl3-20020a170907216300b00887ce5caf67mr544447ejb.297.1675248770780; Wed, 01 Feb 2023 02:52:50 -0800 (PST) MIME-Version: 1.0 From: HHN Date: Wed, 1 Feb 2023 16:22:39 +0530 Message-ID: Subject: Errors when trying to use C++ modules with cmake and GCC To: gcc-help@gcc.gnu.org Content-Type: multipart/alternative; boundary="000000000000e4964605f3a13f89" X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --000000000000e4964605f3a13f89 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 =E2=80=98-fdep-file=3DCMakeFiles/std_module_example.dir/t3.cxx.o.ddi=E2=80= =99 g++: error: unrecognized command-line option =E2=80=98-fdep-output=3DCMakeFiles/std_module_example.dir/t3.cxx.o=E2=80=99 g++: error: unrecognized command-line option =E2=80=98-fdep-format=3Dtrtbd= =E2=80=99 The following in the CMakeLists.txt file : cmake_minimum_required(VERSION 3.23) project(std_module_example CXX) set(CMAKE_CXX_COMPILER "/home/hhn/makes/gcc-install/usr/local/bin/g++") message(STATUS "${CMAKE_CXX_COMPILER}") set(CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API "2182bf5c-ef0d-489a-91da-49dbc3090d2a") if(WIN32) include(msvc_modules.cmake) else() include(gcc_modules.cmake) endif() set(CMAKE_CXX_STANDARD 20) add_library(std_module_example) target_link_libraries(std_module_example) target_sources(std_module_example PRIVATE t4.cxx PUBLIC FILE_SET cxx_modules TYPE CXX_MODULES FILES t1.cxx t2.cxx t3.cxx ) add_executable(main main.cxx) target_link_libraries(main std_module_example) ` I have tried this with g++ 11.3, g++ 12.1 installed using ubuntu package managers, I have also tried the same using this certain patch as suggested by the user on an online forum . I have also tried the same using the master and devel/c++-modules branch on gcc repo. 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). --=20 Hari Hara Naveen --000000000000e4964605f3a13f89--