Skip to content

CROW_AMALGAMATE fails with CMake Ninja generator #865

Closed
@bgs99

Description

@bgs99

When trying to build with CROW_AMALGAMATE=ON and -G Ninjathe

ninja: error: '<...>/Crow/include/*.h', needed by 'crow_all.h', missing and no known rule to make it

error is produced for me on CMake 3.30.2

Seems like globbing is not explicitly supported in DEPENDS argument of add_custom_command and it just happens to work with the Makefile generator.

As a solution, it is possible to use globbing via https://cmake.org/cmake/help/latest/command/file.html#glob. It is not the recommended way, but would probably work no worse than the current approach - the recommended way is to spell all of the dependencies explicitly.

I can make a pull request with either fix if you are interested.

Full configure command for reference:

/usr/bin/cmake -DCROW_AMALGAMATE=ON -S. -Bbuild -G Ninja

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