Skip to content

CMake hello world project requires project name to be a valid C language symbol name #1410

@jld01

Description

@jld01

Steps to reproduce with CDT main HEAD 2026-01-03:

  1. Create a new CMake with hello world executable project named project-1
  2. Build the project
  3. Observe compilation failure in generated config.h due to hyphen in version macro name:
#define project-1_VERSION_MAJOR 0

Should we detect and warn about invalid C symbol characters in CMake project names in the project wizard?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions