mschneider / solcpp

A fast Solana and Mango Markets C++ SDK
Other
40 stars 13 forks source link

Use Conan for easier dependency management #2

Closed bdhobare closed 2 years ago

bdhobare commented 2 years ago

Conan.io is a popular dependency management tool for C/C++ projects. It relieves us of the troubles of manually managing each library in CMake.

Note Building libcurl with gcc-9+ on MacOS currently fails because of [this issue] (https://github.com/curl/curl/issues/4821). Try clang if this happens.

Sfinx commented 2 years ago

: Building libcurl with gcc-9+ on MacOS currently fails because of [this issue] (curl/curl#4821). Try clang if this happens.

btw: cpr already includes and builds curl/libcurl and it is pure c++

mschneider commented 2 years ago

this is awesome

mschneider commented 2 years ago

do you think it's worth removing curl from the dependencies if cpr already includes it?

Sfinx commented 2 years ago

sure, it is extra unneeded dep:

root@Shiva:/opt# ls -l cpr
total 8
drwxrwxr-x 4 root root 4096 фев  9 22:33 include/
drwxrwxr-x 4 root root 4096 фев  9 22:33 lib/
root@Shiva:/opt# ls -l cpr/include
total 108
drwxr-xr-x 2 root root  4096 фев  9 22:33 cpr/
drwxr-xr-x 2 root root  4096 фев  9 22:33 curl/
-rw-r--r-- 1 root root  5297 фев  9 22:32 zconf.h
-rw-r--r-- 1 root root 94060 фев  9 22:32 zlib.h
root@Shiva:/opt# ls -l cpr/lib
total 1480
drwxrwxr-x 3 root root   4096 фев  9 22:33 cmake/
-rw-r--r-- 1 root root 318494 фев  9 22:32 libcpr.a
-rw-r--r-- 1 root root 988868 фев  9 22:32 libcurl.a
-rw-r--r-- 1 root root 194018 фев  9 22:32 libz.a
drwxrwxr-x 2 root root   4096 фев  9 22:33 pkgconfig/
root@Shiva:/opt# 
bdhobare commented 2 years ago

sure, it is extra unneeded dep:

root@Shiva:/opt# ls -l cpr
total 8
drwxrwxr-x 4 root root 4096 фев  9 22:33 include/
drwxrwxr-x 4 root root 4096 фев  9 22:33 lib/
root@Shiva:/opt# ls -l cpr/include
total 108
drwxr-xr-x 2 root root  4096 фев  9 22:33 cpr/
drwxr-xr-x 2 root root  4096 фев  9 22:33 curl/
-rw-r--r-- 1 root root  5297 фев  9 22:32 zconf.h
-rw-r--r-- 1 root root 94060 фев  9 22:32 zlib.h
root@Shiva:/opt# ls -l cpr/lib
total 1480
drwxrwxr-x 3 root root   4096 фев  9 22:33 cmake/
-rw-r--r-- 1 root root 318494 фев  9 22:32 libcpr.a
-rw-r--r-- 1 root root 988868 фев  9 22:32 libcurl.a
-rw-r--r-- 1 root root 194018 фев  9 22:32 libz.a
drwxrwxr-x 2 root root   4096 фев  9 22:33 pkgconfig/
root@Shiva:/opt# 

Thanks. We can do this in a follow up PR.