-
Notifications
You must be signed in to change notification settings - Fork 4
Dependency Install via Conan Package Management #113
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
base: dev
Are you sure you want to change the base?
Dependency Install via Conan Package Management #113
Conversation
|
Why not snap? |
|
Are there good reasons to use snap? |
|
Just that there was a similar suggestion to use snap for picongpu made by @ax3l. So the only reason would be consistency. |
|
Thx for the hint. Its a good idea to have a look at snap and compare it to conan. |
I suggest everything packaging wise :D No seriously, I did not know conan and it looks like a good way to ship binaries and code platform independently. Snap is quite canonical specific. |
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.
The changes are great and I did not know conan before. I would change the title to Document Dependency Install via Conan and would be interested in a follow-up PR that documents how to upload graybat itself to conan (and how to use it in examples from the user side).
.travis.yml
Outdated
| # Conan | ||
| ############################################################################# | ||
| - pip install --upgrade pip --user | ||
| - pip install conan --user |
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.
and then? :)
it's missing the conan based install ^^
update: ah, I see the changes in CMakeLists.txt
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.
You could add the build-deps-from-source and the use conan dependencies as two independent tests in the travis build matrix
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.
Good idea !
| * zeromq 4.1.3 (zeromq communication policy) | ||
| * metis 5.1 (graph partitioning mapping) | ||
|
|
||
| **Note** that some graybat dependencies can be resolved using [conan](https://www.conan.io/) automatically. Have a look into the [conan documentation](http://docs.conan.io/en/latest/getting_started.html) for more details on that. |
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.
Let's add the conan code below this paragraph to resolve all dependencies :)
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.
some or all dependencies?
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.
I want to investigate if I could use local dependencies when they are available and just get the missing ones.
graybatConfig.cmake
Outdated
| if(Boost_FOUND) | ||
| set(graybat_INCLUDE_DIRS ${graybat_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}) | ||
| set(graybat_LIBRARIES ${graybat_LIBRARIES} ${Boost_LIBRARIES}) | ||
| else() |
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.
actually you should never get this branch since find_package on Boost is already issuing a standardized FATAL_ERROR message on REQUIRED.
graybatConfig.cmake
Outdated
| set(graybat_INCLUDE_DIRS ${graybat_INCLUDE_DIRS} ${MPI_C_INCLUDE_PATH}) | ||
| set(graybat_LIBRARIES ${graybat_LIBRARIES} ${MPI_C_LIBRARIES}) | ||
| set(graybat_LIBRARIES ${graybat_LIBRARIES} ${MPI_CXX_LIBRARIES}) | ||
| else() |
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.
make MPI in find_package REQUIRED instead
graybatConfig.cmake
Outdated
| set(graybat_LIBRARIES ${graybat_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) | ||
| if(Threads_FOUND) | ||
| set(graybat_LIBRARIES ${graybat_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) | ||
| else() |
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.
make Threads in find_package REQUIRED instead
graybatConfig.cmake
Outdated
| set(graybat_INCLUDE_DIRS ${graybat_INCLUDE_DIRS} ${ZMQ_INCLUDE_DIRS}) | ||
| set(graybat_LIBRARIES ${graybat_LIBRARIES} ${ZMQ_LIBRARIES}) | ||
| else() | ||
| message(FATAL_ERROR " ZMQ not found.") |
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.
fatal errors will stop the build. if that is planned, make REQUIRED
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.
same above with metis
.travis.yml
Outdated
| - pip install conan --user | ||
|
|
||
| script: | ||
| - cd $HOME/build |
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.
build matrix 2: conan install $GRAYBAT_ROOT?
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.
yeah lets test it.
* Test travis matrix build
4823b81 to
46927fb
Compare
Conan provides a simple solution to resolve dependencies of your C/C++ code. This PR introduces conan into the graybat cmake config file. Up to now only the zmq dependency can be resolved. Available boost packages have no mpi support yet. Providing an own boost package would be the way to go.