8000 Avoid to use external git command and include_directory property if possible by cosmo0920 · Pull Request #9 · zhaozg/luajit-cmake · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Avoid to use external git command and include_directory property if possible #9 8000

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

cosmo0920
Copy link
Contributor
@cosmo0920 cosmo0920 commented Jul 5, 2024

Hi, we have been used this CMake module for bundling LuaJIT into fluent-bit.
We have various usages for this module.

  1. Bundling LuaJIT as containerized environment.

This happens that sometimes git command is absent there. So, for generating relver text should be filled out the current timestamp as a dummy relver.

  1. LuaJIT is using as a bundled module and provides relatively older platforms

This causes that the INCLUDE_DIRECTORIES property in get_target_property shouldn't be handled correctly. And I found that providing to include this property in get_target_property should solve this compilation issue.
The newly introduced LUAJIT_SETUP_INCLUDE_DIR option preserves the default behavior. So, it will not be harmful for the most of users.

  1. For release page, zip or tar.gz couldn't include git repository information. So, we need to add an existence check for it.

If you have a time, could you take a look these patches?

cosmo0920 added 2 commits July 5, 2024 13:42
This is because our use case is bundling LuaJIT and luajit-cmake.
Using INCLUDE_DIRECTORIES property on relatively older cmakes causes
configuration failues:

```
CMake Error at lib/luajit-cmake/CMakeLists.txt:20 (get_target_property):
INTERFACE_LIBRARY targets may only have whitelisted properties.  The
property "INCLUDE_DIRECTORIES" is not allowed.
```

This could be overkill to set up include directories for such case.

Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
This is because git command is sometimes absence for container
environments.
Container environment should be lighter and lighter as much as
possible.

Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
@cosmo0920 cosmo0920 changed the title Avoid to use external git command and include directory property if possible Avoid to use external git command and include_directory property if possible Jul 5, 2024
Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
@cosmo0920 cosmo0920 force-pushed the avoid-to-use-external-git-command-and-include-directory-property-if-possible branch from 66f09f7 to dd59a44 Compare July 10, 2024 00:46
@cosmo0920
Copy link
Contributor Author

Hi, how about this one? We sometimes felt sick for the requirement of git necessity during the configuration phase. This is because some of the package building processes are not processing to install git command. So, I just stubbed with unixepoch instead of commit hash.
Is this workable for the assumed use case?

Recently, another contributor who is enthusiastic for forcibly to create C compiler only environments like using buildroot for embedded platforms.
If this commit were included in the upstream, we were able to sync Fluent Bit source tree.
So, could you take a look on this PR, if you have a cycle?

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.

1 participant
0