title: How to use Bazel as a build tool in Conan.io
body: <p>I am trying to use Conan for package management and Bazel as build tool for my C++ Codes. The reason I am using conan is because JFrog Artifactory supports it, which I am using as my Artifactory Repository.</p>
  
  <p>To do that I came up with the following plan :</p>
  
  <pre><code>$/home/mytimer=&gt; ls -lrt
     0 Sep 25 11:57 WORKSPACE
  4096 Sep 25 12:00 build/
  4096 Sep 25 12:02 main/
  
  $/home/mytimer=&gt; ls -l main
  total 4
  60 Sep 25 12:02 BUILD
  61 Sep 25 11:56 conanfile.txt
  955 Sep 25 11:56 timer.cpp
  
  $/home/mytimer=&gt; ls -l build
  
  total 8
  1266 Sep 25 12:00 conanbuildinfo.gcc
  1875 Sep 25 12:00 conaninfo.txt
  </code></pre>
  
  <p>( This is after I executed conan --install ../main )</p>
  
  <pre><code>$/home/mytimer=&gt; cat cat main/conanfile.txt
  [requires]
  Poco/1.7.8p3@pocoproject/stable
  
  [generators]
  gcc
  
  
  
  $/home/mytimer=&gt;cat build/conanbuildinfo.gcc
  -DPOCO_STATIC=ON -DPOCO_NO_AUTOMATIC_LIBS -I"/home/.conan/data/Poco/1.7.8p3/pocoproject/stable/package/da23483d46b7229cbae8615ce1ea2594635f3a5f/include" -I"/home/.conan/data/OpenSSL/1.0.2l/conan/stable/package/c8dc3f0797f6d24f3c80634ae2854ddf9ee34334/include" -I"/home/.conan/data/zlib/1.2.11/conan/stable/package/82b1dd29b2e9143665c77ef477100c690d719cbf/include" -Wl,-rpath="/home/.conan/data/Poco/1.7.8p3/pocoproject/stable/package/da23483d46b7229cbae8615ce1ea2594635f3a5f/lib" -Wl,-rpath="/home/.conan/data/OpenSSL/1.0.2l/conan/stable/package/c8dc3f0797f6d24f3c80634ae2854ddf9ee34334/lib" -Wl,-rpath="/home/.conan/data/zlib/1.2.11/conan/stable/package/82b1dd29b2e9143665c77ef477100c690d719cbf/lib" -L"/home/.conan/data/Poco/1.7.8p3/pocoproject/stable/package/da23483d46b7229cbae8615ce1ea2594635f3a5f/lib" -L"/home/.conan/data/OpenSSL/1.0.2l/conan/stable/package/c8dc3f0797f6d24f3c80634ae2854ddf9ee34334/lib" -L"/home/.conan/data/zlib/1.2.11/conan/stable/package/82b1dd29b2e9143665c77ef477100c690d719cbf/lib" -lPocoUtil -lPocoMongoDB -lPocoNet -lPocoNetSSL -lPocoCrypto -lPocoData -lPocoDataSQLite -lPocoZip -lPocoXML -lPocoJSON -lPocoFoundation -lpthread -lrt -lssl -lcrypto -ldl -lz -D_GLIBCXX_USE_CXX11_ABI=0 -m64 -s -DNDEBUGdevc
  
  $/home/mytimer=&gt; cat build/conaninfo.txt
  [settings]
  arch=x86_64
  build_type=Release
  compiler=gcc
  compiler.libcxx=libstdc++
  compiler.version=6.3
  os=Linux
  
  [requires]
  Poco/1.Y.Z
  
  [options]
  
  
  [full_settings]
  arch=x86_64
  build_type=Release
  compiler=gcc
  compiler.libcxx=libstdc++
  compiler.version=6.3
  os=Linux
  
  [full_requires]
  OpenSSL/1.0.2l@conan/stable:c8dc3f0797f6d24f3c80634ae2854ddf9ee34334
  Poco/1.7.8p3@pocoproject/stable:da23483d46b7229cbae8615ce1ea2594635f3a5f
  zlib/1.2.11@conan/stable:82b1dd29b2e9143665c77ef477100c690d719cbf
  
  [full_options]
  OpenSSL:386=False
  OpenSSL:no_asm=False
  OpenSSL:no_bf=False
  OpenSSL:no_cast=False
  OpenSSL:no_des=False
  OpenSSL:no_dh=False
  OpenSSL:no_dsa=False
  OpenSSL:no_hmac=False
  OpenSSL:no_md2=False
  OpenSSL:no_md5=False
  OpenSSL:no_mdc2=False
  OpenSSL:no_rc2=False
  OpenSSL:no_rc4=False
  OpenSSL:no_rc5=False
  OpenSSL:no_rsa=False
  OpenSSL:no_sha=False
  OpenSSL:no_sse2=False
  OpenSSL:no_threads=False
  OpenSSL:no_zlib=False
  OpenSSL:shared=False
  Poco:cxx_14=False
  Poco:enable_apacheconnector=False
  Poco:enable_cppparser=False
  Poco:enable_crypto=True
  Poco:enable_data=True
  Poco:enable_data_mysql=False
  Poco:enable_data_odbc=False
  Poco:enable_data_sqlite=True
  Poco:enable_json=True
  Poco:enable_mongodb=True
  Poco:enable_net=True
  Poco:enable_netssl=True
  Poco:enable_netssl_win=True
  Poco:enable_pagecompiler=False
  Poco:enable_pagecompiler_file2page=False
  Poco:enable_pdf=False
  Poco:enable_pocodoc=False
  Poco:enable_sevenzip=False
  Poco:enable_tests=False
  Poco:enable_util=True
  Poco:enable_xml=True
  Poco:enable_zip=True
  Poco:force_openssl=True
  Poco:poco_unbundled=False
  Poco:shared=False
  zlib:shared=False
  
  [scope]
  dev=True
  
  [recipe_hash]
  
  
  [env]
  
  $/home/mytimer=&gt; cat main/BUILD
  cc_binary(
  name = "timer",
  srcs = ["timer.cpp"],
  )
  </code></pre>
  
  <p>Now, I want to build the mytimer project using bazel as something like this :
  $/home/mytimer=> bazel build --(some options) //main:timer</p>
  
  <p>What should this some options be , so that bazel can read conanbuildinfo.gcc and use it to create the executable file ?</p>