Skip to content

Instantly share code, notes, and snippets.

@htfy96
Created December 5, 2019 18:32
Show Gist options
  • Save htfy96/b92c36ecc52b1e91dff8ea6752f53dea to your computer and use it in GitHub Desktop.
Save htfy96/b92c36ecc52b1e91dff8ea6752f53dea to your computer and use it in GitHub Desktop.
Install conan packages and build with cmake_multi generator
#!/bin/bash
# Usage:
# Assuming you are in ROOT/build
# and ROOT contains conanfile.txt and CMakeLists.txt
# ./install_dep_and_build [Debug|Release|RelWithDebInfo]
# Prerequisite:
# Make sure you have
# [generators]
# cmake_multi
# in your config file
set -xe
conan install .. -g cmake_multi -s build_type=$1 --build=missing
cmake -DCMAKE_BUILD_TYPE=$1 ..
cmake --build . --config=$1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment