Skip to content

Showcase insertion of CMake variables via configure_file() #85

@avitase

Description

@avitase

Occasionally, I have to use CMake variables inside my C/C++ files. A canonical way to get access to these variables is to parse the file via configure_file(); however, I find it non-trivial to insert this into the existing template. What about showcasing this by, for example, returning CMAKE_PROJECT_NAME instead of hard coding the name here. Another common use case is to return the project version as a string.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions