edisongustavo commented on issue #13400: [MXNET-1229] use OpenBLAS, lapack &
OpenCV from conan
URL: https://github.com/apache/incubator-mxnet/pull/13400#issuecomment-461348850
> 1.there is non-intrusive CMake integration for conan available as well,
check out this article: [conan: transparent CMake
integration](https://blog.conan.io/2018/06/11/Transparent-CMake-Integration.html)
Great! Thanks for the link. I am in favor of using this "Transparent CMake
integration: “cmake_paths” generator". So we could do the dance:
```
$ rm -rf build && mkdir build && cd build
$ conan install ..
$ cmake .. -DCMAKE_BUILD_TYPE=Release
-DCMAKE_TOOLCHAIN_FILE=./conan_paths.cmake
$ cmake --build .
```
This is very similar to what would be the conda dance:
```
$ conda env create -f environment.yml -n mxnet-dependencies
$ conda activate mxnet-dependencies
$ rm -rf build && mkdir build && cd build
$ cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=$CONDA_PREFIX
$ cmake --build .
```
I have some comments and questions about the conan part:
In the blog post it shows the integration using the variables created by
each library (eg: `${CURL_INCLUDE_DIRS}` and `${CURL_LIBRARIES}`). This is the
deprecated way of linking with targets. Using *imported targets* is the
preferred way (if possible) and the CURL example is no exception. You can see
that in the
[FindCURL.cmake](https://github.com/Kitware/CMake/blob/master/Modules/FindCURL.cmake)
file you can use the imported target `CURL::libcurl`, which should take care
of all transitivity and order of linking problems.
Is there something I'm missing here?
> 2. it's still possible to use dependencies provided by operation system
Great! I believe that it could be done if we use conan along the route
specified in my comment above, correct?
> 3. I am not sure about your concern of connection required for conan. I
think it's the same situation for conda, isn't it?
Given that you've sent that blog post it has clarified things for me. My
concern was in the case of conan working only in this "intrusive mode" (where
you have to modify your CMakeLists.txt) so then requiring the internet
connection every time you call cmake. Since we could use the "cmake_paths"
generator then this is not a concern anymore.
A question for you: How easy is it to mirror a conan repository? Or maybe
only mirroring the packages we need. Is that possible?
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org
With regards,
Apache Git Services