forked from conan-io/conan-center-index
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(conan-io#15836) coin-clp: conan v2 support
* conan v2 support * add package_type
- Loading branch information
1 parent
bb62300
commit 9450588
Showing
9 changed files
with
131 additions
and
103 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,12 @@ | ||
sources: | ||
"1.17.6": | ||
url: "https://github.com/coin-or/Clp/archive/releases/1.17.6.tar.gz" | ||
sha256: "afff465b1620cfcbb7b7c17b5d331d412039650ff471c4160c7eb24ae01284c9" | ||
"1.17.7": | ||
url: "https://github.com/coin-or/Clp/archive/releases/1.17.7.tar.gz" | ||
url: "https://github.com/coin-or/Clp/archive/refs/tags/releases/1.17.7.tar.gz" | ||
sha256: "c4c2c0e014220ce8b6294f3be0f3a595a37bef58a14bf9bac406016e9e73b0f5" | ||
patches: | ||
"1.17.6": | ||
- patch_file: "patches/0001-no-pkg-config-check.patch" | ||
base_path: "source_subfolder" | ||
url: "https://github.com/coin-or/Clp/archive/refs/tags/releases/1.17.6.tar.gz" | ||
sha256: "afff465b1620cfcbb7b7c17b5d331d412039650ff471c4160c7eb24ae01284c9" | ||
patches: | ||
"1.17.7": | ||
- patch_file: "patches/0002-no-pkg-config-check.patch" | ||
base_path: "source_subfolder" | ||
- patch_file: "patches/1.17.7-0001-no-pkg-config-check.patch" | ||
"1.17.6": | ||
- patch_file: "patches/1.17.6-0001-no-pkg-config-check.patch" |
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
File renamed without changes.
File renamed without changes.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,31 @@ | ||
from conans import ConanFile, CMake, tools | ||
from conan import ConanFile | ||
from conan.tools.build import can_run | ||
from conan.tools.cmake import CMake, cmake_layout | ||
import os | ||
|
||
|
||
class TestPackageConan(ConanFile): | ||
settings = "os", "arch", "compiler", "build_type" | ||
generators = "cmake", "pkg_config" | ||
generators = "CMakeToolchain", "PkgConfigDeps", "VirtualBuildEnv", "VirtualRunEnv" | ||
test_type = "explicit" | ||
|
||
def layout(self): | ||
cmake_layout(self) | ||
|
||
def requirements(self): | ||
self.requires(self.tested_reference_str) | ||
|
||
def build_requirements(self): | ||
self.build_requires("pkgconf/1.7.4") | ||
if not self.conf.get("tools.gnu:pkg_config", check_type=str): | ||
self.tool_requires("pkgconf/1.9.3") | ||
|
||
def build(self): | ||
cmake = CMake(self) | ||
cmake.configure() | ||
cmake.build() | ||
|
||
def test(self): | ||
if not tools.cross_building(self): | ||
bin_path = os.path.join("bin", "test_package") | ||
if can_run(self): | ||
bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") | ||
mps = os.path.join(self.source_folder, "sample.mps") | ||
self.run("{} {}".format(bin_path, mps), run_environment=True) | ||
self.run(f"{bin_path} {mps}", env="conanrun") |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
cmake_minimum_required(VERSION 3.1) | ||
project(test_package) | ||
|
||
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) | ||
conan_basic_setup(TARGETS) | ||
|
||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package | ||
${CMAKE_CURRENT_BINARY_DIR}/test_package) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from conans import ConanFile, CMake, tools | ||
import os | ||
|
||
|
||
class TestPackageConan(ConanFile): | ||
settings = "os", "arch", "compiler", "build_type" | ||
generators = "cmake", "pkg_config" | ||
|
||
def build_requirements(self): | ||
self.build_requires("pkgconf/1.9.3") | ||
|
||
def build(self): | ||
cmake = CMake(self) | ||
cmake.configure() | ||
cmake.build() | ||
|
||
def test(self): | ||
if not tools.cross_building(self): | ||
bin_path = os.path.join("bin", "test_package") | ||
mps = os.path.join(self.source_folder, os.pardir, "test_package", "sample.mps") | ||
self.run(f"{bin_path} {mps}", run_environment=True) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
versions: | ||
"1.17.6": | ||
folder: "all" | ||
"1.17.7": | ||
folder: "all" | ||
"1.17.6": | ||
folder: "all" |