Skip to content

Add compiler option to generate only files #634

@aregtech

Description

@aregtech

Description

Currently, the Areg SDK build process includes service interface files in the CMakeLists.txt using the addServiceInterface() function. When a build is triggered, the SDK generates code from the service interface files and immediately proceeds to compile the application.

In the most development workflows, developers may want to generate the service interface files first, implement the corresponding methods, and only then include the objects in the build.

To support this workflow, a new compiler option AREG_GENERATE_ONLY is proposed. When this flag is enabled, the SDK would generate all necessary source and header files for the service interfaces without triggering the application build. This allows developers to implement method bodies and integrate the generated code at their own pace before compilation.

Benefits

  • Supports incremental development by separating code generation from compilation.
  • Improves developer workflow for large or complex projects.
  • Ensures generated service interfaces can be reviewed and extended before being included in the build.
  • Fully compatible with existing addServiceInterface() workflows.

Proposed Usage

cmake -DAREG_GENERATE_ONLY=ON ..

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions