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

CMake support #55

Open
tdegeus opened this issue Jan 28, 2021 · 11 comments
Open

CMake support #55

tdegeus opened this issue Jan 28, 2021 · 11 comments

Comments

@tdegeus
Copy link
Contributor

tdegeus commented Jan 28, 2021

Nice library!

I wonder though, do you provide CMake support / would you be willing to consider this (I'm happy to open a PR)?

@ashok-arora
Copy link

What exactly do you mean by CMake support?

@tdegeus
Copy link
Contributor Author

tdegeus commented Feb 2, 2021

I mean that it would be great if a CMake target be defined that contains the path where the header is installed. This way one can use CMake to configure, for example as follows:

cmake_minimum_required(VERSION 3.1)
project(example)
find_package(tqdm.cpp REQUIRED)
add_executable(example example.cpp)
target_link_libraries(example PRIVATE tqdm.cpp)

@tdegeus
Copy link
Contributor Author

tdegeus commented Feb 2, 2021

It's really not hard, and on top of that I would be willing to provide a PR

@ashok-arora
Copy link

I am not a member of the tqdm org but looking at the commit history and their delayed/no response to PRs/issues tells me that they aren't interested in this C++ port of tqdm which is a pity.

I would love to see a similar scoped library for C++.

@casperdcl
Copy link
Member

casperdcl commented Feb 3, 2021

Hi; would be happy to accept a PR.

The library itself is really basic compared to the Python version and I'm unlikely to personally work on it more until I have a personal project which needs it (as with all my unpaid open source efforts :P).

I spend most of my time now wrapping CUDA/C/C++ in Python so happily get to use the latter for progress monitoring.

Also in simple cases you could always pipe the stderr or stdout of a C/C++/etc program to tqdm's CLI interface:

seq 10000 | python -m tqdm --null --total 10000

@tdegeus
Copy link
Contributor Author

tdegeus commented Feb 3, 2021

Alright, then I'll make a PR in the coming days. Would you be willing to create a release thereafter, such that I can add the library to conda-forge?

Thanks for the pipe suggestion, that is in fact really nice!

@casperdcl
Copy link
Member

Yes, sure.

@tdegeus
Copy link
Contributor Author

tdegeus commented Feb 7, 2021

@casperdcl The lines under this if statement cause all kinds of problems on my system. What do they do? Are they really needed?

if(UNIX)

@ashok-arora
Copy link

@tdegeus What OS are you on?

@tdegeus
Copy link
Contributor Author

tdegeus commented Feb 7, 2021

@ashok-arora OSx

@casperdcl
Copy link
Member

not super necessary - it's possible that maybe we should even leave out precompiled header logic altogether (leaving it as an optimisation for users to implement in case they want).

If it doesn't work on fruit, maybe try changing to:

if(UNIX AND NOT APPLE)

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

Successfully merging a pull request may close this issue.

3 participants