Created
November 9, 2018 23:59
-
-
Save puetzk/a6f2e77eb6dd048e7a6859e2cbb015fa to your computer and use it in GitHub Desktop.
Example files for conan requires vs build_requires mismatch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
conan create required.py required/1.0@bug/example | |
conan create required.py required/1.1@bug/example | |
conan create build_required.py build_required/1.0@bug/example | |
conan create . consumer/1.0@bug/example |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from conans import ConanFile, tools | |
class BuildrequiredConan(ConanFile): | |
name = "build_required" | |
version = "1.0" | |
requires = "required/1.0@bug/example" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from conans import ConanFile, tools | |
import os | |
import json | |
class ConsumerConan(ConanFile): | |
name = "consumer" | |
version = "1.0" | |
requires = "required/1.1@bug/example" | |
build_requires = "build_required/1.0@bug/example" | |
generators = "cmake" | |
def build(self): | |
tools.save(os.path.join(self.build_folder,"required.cpp_info.txt"), json.dumps(self.deps_cpp_info['required'].__dict__, indent=4)) | |
tools.save(os.path.join(self.build_folder,"build_required.cpp_info.txt"), json.dumps(self.deps_cpp_info['build_required'].__dict__, indent=4)) | |
def package(self): | |
self.copy("*.cpp_info.txt") | |
def package_id(self): | |
self.info.requires['required'].full_package_mode() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from conans import ConanFile, tools | |
class ConsumerConan(ConanFile): | |
name = "required" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment