-
Notifications
You must be signed in to change notification settings - Fork 159
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
Fix find_package, enable CPack and support clang-cl #338
Conversation
Signed-off-by: ToKiNoBug <tokinobug@163.com>
Signed-off-by: ToKiNoBug <tokinobug@163.com>
Signed-off-by: ToKiNoBug <tokinobug@163.com>
Signed-off-by: ToKiNoBug <tokinobug@163.com>
Signed-off-by: ToKiNoBug <tokinobug@163.com>
Signed-off-by: ToKiNoBug <tokinobug@163.com>
Python build fixed. |
Besides, I found that gcc13 can't build kompute because built in fmtlib(v8.1.1) has a |
Signed-off-by: ToKiNoBug <tokinobug@163.com>
I would be keen to continue with strict -W options as it ensures a clean / maintainable codebase even if often can be a pain intially when introducing |
We can update the version of builtin fmtlib to v10.1.1. Althoug we can't control the version of external fmtlib, we can report a warning/error if users are building kompute with gcc13 or later with fmtlib v9 or earlier. |
|
Signed-off-by: ToKiNoBug <tokinobug@163.com>
I have updated the version of builtin fmt to 10.1.1. But I found it hard to provide a warning about old fmt without complexity. Older fmt doesn't tell its version, may be there's some tricks to get its version, but the code will be too complex. |
Signed-off-by: ToKiNoBug <tokinobug@163.com>
Signed-off-by: ToKiNoBug <tokinobug@163.com>
I hope to know if there is anything I should do about this PR. Any problem or requirement? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good - thank you for the contribution
This PR aims to make
kompute
easier to be used as a C++ SDK.Add support to clang-cl
Before this clang-cl is treated like g++ or clang++, and many
-W
flags are passed to it, but clang-cl is a MSVC-like frontend.Fix an error when kompute is being imported as a cmake package
komputeTargets.cmake
is required in afind_package
call, but this file is not generated previously.Fix a bug to support fmtlib v10
fmtlib v10 doesn't think
std::array<char,N>
is formattable, so we use.data()
.Fix
KOMPUTE_OPT_INSTALL
.Previously this option doesn't work because
install
calls will always take effect regardless of the value ofKOMPUTE_OPT_INSTALL
. Now no kompute files will be installed ifKOMPUTE_OPT_INSTALL
is set to OFF.Enable CPack to generate many kinds of software packages like deb, rpm, zip, 7z, mac bundle, NSIS, etc.
Configurations for many other kinds of packages can be added in future.
To use cpack, run
cpack -G <generator>
in the build directory. For example:cd build cpack -G TXZ cpack -G DEB
This will generate a deb package and a tar.xz package.