Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make: Include submodule header files #538

Merged

Conversation

abetomo
Copy link
Contributor

@abetomo abetomo commented Nov 21, 2024

For use in a C++ project, we configured CMakeLists.txt to fetch and build USearch.

For example, the following configuration:

fetchcontent_declare(
  usearch
  GIT_REPOSITORY "https://github.com/unum-cloud/usearch.git"
  GIT_TAG "v2.16.5"
  GIT_SUBMODULES ...)
fetchcontent_makeavailable(usearch)

Then it cannot find the header file for the submodule and an error occurs.

For example, the following errors:

.../_deps/usearch-src/include/usearch/index_plugins.hpp:37:10: fatal error: fp16/fp16.h: No such file or directory
   37 | #include <fp16/fp16.h>

So we added a header file to be included in target_include_directories().

For use in a C++ project, we configured CMakeLists.txt to fetch and build USearch.

For example, the following configuration:
```
fetchcontent_declare(
  usearch
  GIT_REPOSITORY "https://github.com/unum-cloud/usearch.git"
  GIT_TAG "v2.16.5"
  GIT_SUBMODULES ...)
fetchcontent_makeavailable(usearch)
```

Then it cannot find the header file for the submodule and an error occurs.

For example, the following errors:
```
.../_deps/usearch-src/include/usearch/index_plugins.hpp:37:10: fatal error: fp16/fp16.h: No such file or directory
   37 | #include <fp16/fp16.h>
```

So we added a header file to be included in target_include_directories().
@ashvardanian ashvardanian changed the base branch from main-dev to main November 21, 2024 08:55
@ashvardanian ashvardanian merged commit ae47cf2 into unum-cloud:main Nov 21, 2024
13 checks passed
@abetomo abetomo deleted the cmake-include-submodule-header-files branch November 21, 2024 09:01
@abetomo
Copy link
Contributor Author

abetomo commented Nov 21, 2024

Thanks for the quick response.

@ashvardanian
Copy link
Contributor

It was an easy call @abetomo, thanks to you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants