Conan Client: Difference between revisions
Jump to navigation
Jump to search
Line 26: | Line 26: | ||
==Getting Started== | ==Getting Started== | ||
'''Example: 1''' | |||
<source lang="bash"> | <source lang="bash"> | ||
cd $ACADEMIA_HOME/wss/ccpp_wss/ | cd $ACADEMIA_HOME/wss/ccpp_wss/ | ||
Line 41: | Line 42: | ||
</source> | </source> | ||
'''Example: 2''' | |||
<source lang="bash" highlight="3,12-19"> | <source lang="bash" highlight="3,12-19"> | ||
cd $ACADEMIA_HOME/wss/ccpp_wss/ | cd $ACADEMIA_HOME/wss/ccpp_wss/ |
Revision as of 16:32, 24 July 2021
Linux
apt install python3-all python3-pip python3-venv
python3 -m venv ~/.venv/conan
source ~/.venv/conan/bin/activate
python -m pip install -U pip
pip install conan
conan --help
Windows
run as administrator 1. Press ⊞ + R 2. Type in cmd 3. Press Ctrl + Shift + Enter 4. Choose Yes and Press Enter
python -m pip install virtualenv
python -m venv ~\.venv\conan
~\.venv\conan\Scripts\activate
python -m pip install -U pip
pip install conan
conan --help
Getting Started
Example: 1
cd $ACADEMIA_HOME/wss/ccpp_wss/
git clone https://github.com/conan-io/examples.git
cd examples/libraries/poco/md5/
conan search poco --remote=conancenter
conan inspect poco/1.9.4
cat conanfile.txt
mkdir cmake-build-debug; cd cmake-build-debug
conan install .. -s compiler="Visual Studio" -s compiler.runtime=MDd -s build_type=Debug -s compiler.version=16
conan info .. --graph=graph.html
graph.html
Example: 2
cd $ACADEMIA_HOME/wss/ccpp_wss/
git clone https://github.com/drodri/clion_conan.git;cd clion_conan/boost_poco_md5
conan profile remove settings.compiler.libcxx default
mkdir cmake-build-debug; cd cmake-build-debug
conan search poco--remote=conancenter
conan inspect poco/1.11.0
conan search boost --remote=conancenter
conan inspect boost/1.76.0
cat <<EOF > ../conanfile.txt
[requires]
poco/1.11.0
boost/1.76.0
[generators]
cmake
EOF
conan install .. -s compiler="Visual Studio" -s compiler.runtime=MDd -s build_type=Debug -s compiler.version=16
conan info .. --graph=graph.html
graph.html
Knowledge
git clone https://github.com/conan-io/conan.git conan;\ cd conan; python -m pip install -e . pip install conan --upgrade
ls -la ~/.conan/profiles/ cat ~/.conan/profiles/default
conan info .. conan search "*" conan search poco/1.9.4@ conan info .. --graph=file.html conan install .. --profile=gcc_x86 conan install .. --settings arch=x86 conan install .. --settings os="Linux" --settings compiler="gcc"