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

What about CMake? #103

Closed
golxzn opened this issue Jan 9, 2023 · 9 comments
Closed

What about CMake? #103

golxzn opened this issue Jan 9, 2023 · 9 comments

Comments

@golxzn
Copy link

golxzn commented Jan 9, 2023

Would you like to add CMake support? It's not so hard for header-only library
You can use this tool for making cmake project just in a few commands

@wxinix
Copy link

wxinix commented Feb 15, 2023

Cmake? co-ask.

@eyalz800
Copy link
Owner

Acknowledged the ask, I will free some time for this but I can’t promise it’s soon because I see this as a nice to have

@Traveller23
Copy link

It's a header only library, it doesn't need to "make" itself, so in my opinion cmake is not necessary.
This is how I reference it in my cmake project:

target_include_directories(my_test SYSTEM PRIVATE C:/Libraries/zpp_bits)

You could replace the path with variable ${ZPP_BITS_PATH}, and then provide this variable to the cmake command, for example:

-DZPP_BITS_PATH="C:/Libraries/zpp_bits"

Anyway, you need a way to find the library, even with cmake.

@wxinix
Copy link

wxinix commented Feb 15, 2023 via email

@Traveller23
Copy link

CMake is needed for the test cases

Well, indeed it is.

@eyalz800
Copy link
Owner

But the test cases are not a dependency in your project

@wxinix
Copy link

wxinix commented Feb 15, 2023 via email

@golxzn
Copy link
Author

golxzn commented Feb 16, 2023

Well, CMake might be overkill for header only library, but as @wxinix said, it'll be great to cover code by tests.

But the test cases are not a dependency in your project

But the case that I really want to achieve is cloning project during configuration step. I usually use CPM for managing project's dependencies. And it's pretty uncomfortable for me to load and insert some third_party stuff to the project. I enjoy to load dependencies into the build folder, which is ignored by git 🍰

@eyalz800
Copy link
Owner

eyalz800 commented May 8, 2023

Closed due to inactivity, as mentioned in above comments cmake transparently works with header only.

@eyalz800 eyalz800 closed this as completed May 8, 2023
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

No branches or pull requests

4 participants