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

Attempted fix for install of header-only libraries #177

Merged
merged 1 commit into from
Oct 6, 2023

Conversation

isherman
Copy link
Contributor

@isherman isherman commented Oct 2, 2023

When trying to invoke a make install with a medium-sized parent project (path is redacted here as <...>) I encountered the following error, related to the header-only "core/struct" library:

CMake Error at <...>/farm_ng_core/cpp/farm_ng/core/struct/cmake_install.cmake:46 (file):
  file INSTALL cannot find
  "<...>/farm_ng_core/cpp/farm_ng/core/struct/base":
  No such file or directory.
Call Stack (most recent call first):
  <...>/farm_ng_core/cpp/farm_ng/core/cmake_install.cmake:57 (include)
  <...>/farm_ng_core/cpp/cmake_install.cmake:52 (include)
  <...>/farm_ng_core/cmake_install.cmake:57 (include)
  cmake_install.cmake:47 (include)

This attempted fix puts more of the install logic behind the condition that we're building a library with headers + sources.

It works for my specific use case; admittedly I have not made the effort to understand all of the surrounding logic in this macro.

Copy link
Member

@strasdat strasdat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, all CI passes so there is little risk

cmake/farm_ng_add_library.cmake Outdated Show resolved Hide resolved
@isherman isherman force-pushed the fix-header-only-install branch from cde37a5 to 5870be1 Compare October 6, 2023 22:07
@isherman isherman merged commit 77e1fc2 into main Oct 6, 2023
13 checks passed
@isherman isherman deleted the fix-header-only-install branch October 6, 2023 22:58
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