Skip to content

Instantly share code, notes, and snippets.

@happy-monk
Last active May 20, 2019 13:33
Show Gist options
  • Save happy-monk/351a078d7026fdca577aa0bdd4e5d09d to your computer and use it in GitHub Desktop.
Save happy-monk/351a078d7026fdca577aa0bdd4e5d09d to your computer and use it in GitHub Desktop.
Conan: subdependency options conflict
import os
from conans import ConanFile, CMake, tools
from conans.client.loader import ConanFileLoader
class PkgConanFile(ConanFile):
name = 'X'
version = '2.0'
settings = 'os', 'compiler', 'build_type', 'arch'
def requirements(self):
self.requires('PkgA/1.0@test/stable')
self.requires('PkgB/1.0@test/stable')
self.requires('boost/1.67.0@conan/stable')
def configure(self):
self.options["boost"].skip_lib_rename = True
Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=gcc
compiler.libcxx=libstdc++
compiler.version=5
os=Linux
os_build=Linux
[options]
[build_requires]
[env]
ERROR: boost/1.67.0@conan/stable: PkgB/1.0@test/stable tried to change boost/1.67.0@conan/stable option skip_lib_rename to False
but it was already assigned to True by PkgA/1.0@test/stable
import os
from conans import ConanFile, CMake, tools
class PkgConanFile(ConanFile):
name = 'PkgA'
version = '1.0'
settings = 'os', 'compiler', 'build_type', 'arch'
def requirements(self):
self.requires('boost/1.67.0@conan/stable')
def configure(self):
self.options['boost'].skip_lib_rename = True
import os
from conans import ConanFile, CMake, tools
class PkgConanFile(ConanFile):
name = 'PkgB'
version = '1.0'
settings = 'os', 'compiler', 'build_type', 'arch'
def requirements(self):
self.requires('boost/1.67.0@conan/stable')
def configure(self):
self.options['boost'].skip_lib_rename = False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment