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#16392) Wg21 linear algebra conan 2
* Begin porting to Conan 2.0 * Update wg21-linear_algebra to Conan 2.0 * Linter fixes * Support Conan 1 & 2 during migration period * Move to test_v1_package * test_v1_package mirrors test_package * Explicit test required during mirgration * Code review feedback * Update to version 0.7.3 * Whitespace * Linter fix * More linter fixes * Less is more :) * Whitespace * Add msvc version * Simplify validate exception message * Update recipes/wg21-linear_algebra/all/test_v1_package/CMakeLists.txt Co-authored-by: Chris Mc <prince.chrismc@gmail.com> * fix: do not remove legacy target information * Update supported compilers * chore: dont pass lang twice to cmake and drop extra call to find package * chore: c3i clang-11 image has a bug that blocks c++17 and up --------- Co-authored-by: Rubén Rincón Blanco <rubenrb@jfrog.com> Co-authored-by: Chris Mc <prince.chrismc@gmail.com>
- Loading branch information
1 parent
094a768
commit 5eb5c0d
Showing
8 changed files
with
73 additions
and
44 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,4 +1,4 @@ | ||
sources: | ||
"0.7.2": | ||
url: https://github.com/BobSteagall/wg21/archive/refs/tags/v0.7.2.tar.gz | ||
sha256: 4a192d279491264be2d687f89c15432fcb4f2e2d113599152bd3df2df42ce9e1 | ||
"0.7.3": | ||
url: https://github.com/BobSteagall/wg21/archive/refs/tags/v0.7.3.tar.gz | ||
sha256: ff4bc5788793e3c5f65d98f50029b4f762ffa38572867701053dacb572b85098 |
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
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,16 +1,25 @@ | ||
from conans import ConanFile, CMake, tools | ||
import os | ||
|
||
from conan import ConanFile | ||
from conan.tools.build import can_run | ||
from conan.tools.cmake import CMake, cmake_layout | ||
|
||
class TestPackageConan(ConanFile): | ||
settings = "os", "arch", "compiler", "build_type" | ||
generators = "cmake", "cmake_find_package_multi" | ||
generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" | ||
test_type="explicit" | ||
|
||
def requirements(self): | ||
self.requires(self.tested_reference_str) | ||
|
||
def layout(self): | ||
cmake_layout(self) | ||
|
||
def build(self): | ||
cmake = CMake(self) | ||
cmake.configure() | ||
cmake.build() | ||
|
||
def test(self): | ||
if not tools.cross_building(self): | ||
self.run(os.path.join("bin", "test_package"), run_environment=True) | ||
if can_run(self): | ||
bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") | ||
self.run(bin_path, env="conanrun") |
6 changes: 3 additions & 3 deletions
6
recipes/wg21-linear_algebra/all/test_package/test_package.cpp
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
8 changes: 8 additions & 0 deletions
8
recipes/wg21-linear_algebra/all/test_v1_package/CMakeLists.txt
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.12) | ||
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/) |
18 changes: 18 additions & 0 deletions
18
recipes/wg21-linear_algebra/all/test_v1_package/conanfile.py
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,18 @@ | ||
from conans import ConanFile, CMake | ||
from conan.tools.build import cross_building | ||
import os | ||
|
||
# legacy validation with Conan 1.x | ||
class TestPackageV1Conan(ConanFile): | ||
settings = "os", "arch", "compiler", "build_type" | ||
generators = "cmake", "cmake_find_package_multi" | ||
|
||
def build(self): | ||
cmake = CMake(self) | ||
cmake.configure() | ||
cmake.build() | ||
|
||
def test(self): | ||
if not cross_building(self): | ||
bin_path = os.path.join("bin", "test_package") | ||
self.run(bin_path, 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,3 +1,3 @@ | ||
versions: | ||
"0.7.2": | ||
"0.7.3": | ||
folder: all |