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

Possible make install rule for cmake ? #68

Closed
GuacheSuede opened this issue Nov 24, 2020 · 8 comments · Fixed by #80
Closed

Possible make install rule for cmake ? #68

GuacheSuede opened this issue Nov 24, 2020 · 8 comments · Fixed by #80
Assignees
Labels
feature Code based project improvement

Comments

@GuacheSuede
Copy link

No description provided.

@The-EDev
Copy link
Member

Well Crow is a header only library, meaning there isn't anything to compile, you just copy the header file(s) into your project and include it/them.

If I'm getting this completely wrong I apologize and could you please clarify how an install rule could be useful?

@The-EDev The-EDev added the question Issue can be closed by providing information label Nov 24, 2020
@GuacheSuede
Copy link
Author

What i do is copy the crow headers into /usr/include manually via cp so that i can be used globally. Would be good to have a make install step that does this automatically

@The-EDev
Copy link
Member

Hmmm, I understand now, I'll look into it when I can (I'm focusing on Documentation at the moment), If you have time and don't mind doing it, feel free to open a PR and I'll merge it.

@The-EDev The-EDev added feature Code based project improvement and removed question Issue can be closed by providing information labels Nov 25, 2020
@GuacheSuede
Copy link
Author

GuacheSuede commented Nov 25, 2020

Understood.

I have a question. I performed some benchmarks on Crow and realized that it seems after the first initial connection, subsequent responses to requests are retuned very fast. Would you know which part of the code allows this to happen ?

Thanks.

@The-EDev
Copy link
Member

The-EDev commented Nov 25, 2020

I'm assuming that you're using different routes, this is most likely due to crow having to initialize some ASIO objects that are then being reused, though I'm not sure which objects these are, you can look in http_server.h (do_accept()) and http_connection.h if you'd like to investigate this further.

if you're using the same route on a browser, it's most likely the browser itself caching the result.

@ayaankhan98
Copy link
Contributor

ayaankhan98 commented Nov 27, 2020

Is it fine to write a bash script to automate this process of installation (basically copying to /usr/include) after successful local build? Let me know if it sounds good i will open a PR for that

@The-EDev
Copy link
Member

Why do that when cmake can have a specific install rule?

@ayaankhan98
Copy link
Contributor

Why do that when cmake can have a specific install rule?

yes will do that with cmake Install rules; don't know why i had mentioned about bash script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Code based project improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants