Skip to content

Dependency resolver ignores user-defined name of library #6

@daixtrose

Description

@daixtrose

Summary

Not sure if this is a bug. FetchContent allows one to declare private names for dependencies (please note the lowercase catch2):

FetchContent(catch2 GIT_REPOSITORY https://github.com/catchorg/Catch2 GIT_TAG v2.x)

But it seems that the directory population uses the original uppercase name. To my surprise the reference to the _SOURCE_DIR must use the original upper case name, i.e.

list(APPEND CMAKE_MODULE_PATH ${Catch2_SOURCE_DIR}/contrib)

How to reproduce

Use the testsuite in https://github.com/dep-heaven/tool_1:

git clone https://github.com/dep-heaven/tool_1
cd tool_1/
mkdir build
cd build/
cmake ..

Output

...
WARNING! Something is still wrong here!
   RepoMan should populate selected name, not original name
==> Toplevel: catch2_SOURCE_DIR = ''
==> Toplevel: Catch2_SOURCE_DIR = '/home/markus/PROJECT/GARBAGE/tool_1/ws/catch2'
==> Toplevel: lib_A_SOURCE_DIR = '/home/markus/PROJECT/GARBAGE/tool_1/ws/lib_A'
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions