-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(#16299) cubicinterpolation: modernize for conan 2.0
* compatability of cubic_interpolation with Conan 2.0 * missing newline * use patch from new resource * invalid use of patch * adapt structure for patch * add patch for older version of package * safe delete of fPIC * disable VS<16 * fix VS check * add suggestions by @prince-chrismc * update organization name * clarify TODO in comment * rename patch files and remove duplicate cpp file * Apply suggestions from code review --------- Co-authored-by: Chris Mc <[email protected]>
- Loading branch information
1 parent
2058822
commit 4de26d0
Showing
9 changed files
with
134 additions
and
85 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,17 +1,21 @@ | ||
sources: | ||
"0.1.5": | ||
url: "https://github.com/MaxSac/cubic_interpolation/archive/v0.1.5.tar.gz" | ||
url: "https://github.com/tudo-astroparticlephysics/cubic_interpolation/archive/v0.1.5.tar.gz" | ||
sha256: "fc34de15c9dd9e651728c9e0eee5528ee9636e41a3d8aa6f41735018810afd59" | ||
"0.1.4": | ||
url: "https://github.com/MaxSac/cubic_interpolation/archive/v0.1.4.tar.gz" | ||
url: "https://github.com/tudo-astroparticlephysics/cubic_interpolation/archive/v0.1.4.tar.gz" | ||
sha256: "38bb8fe46b19b135bfcba79e098c5d90284f0bc02f42f86118aefcb63aed7668" | ||
"0.1.3": | ||
url: "https://github.com/MaxSac/cubic_interpolation/archive/v0.1.3.tar.gz" | ||
url: "https://github.com/tudo-astroparticlephysics/cubic_interpolation/archive/v0.1.3.tar.gz" | ||
sha256: "3151d99ecbbddd4e57605ff1919bdf234d08336b47d369b9dc562acff780aaf7" | ||
patches: | ||
"0.1.4": | ||
- patch_file: "patches/patch_conanbuildinfo.txt" | ||
base_path: "source_subfolder" | ||
- patch_file: "patches/patch_conanbuildinfo.diff" | ||
patch_type: "conan" | ||
- patch_file: "patches/rm_conan_basic_setup.diff" | ||
patch_type: "conan" | ||
"0.1.3": | ||
- patch_file: "patches/patch_conanbuildinfo.txt" | ||
base_path: "source_subfolder" | ||
- patch_file: "patches/patch_conanbuildinfo.diff" | ||
patch_type: "conan" | ||
- patch_file: "patches/rm_conan_basic_setup.diff" | ||
patch_type: "conan" |
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
24 changes: 24 additions & 0 deletions
24
recipes/cubicinterpolation/all/patches/patch_conanbuildinfo.diff
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,24 @@ | ||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt | ||
index 0199a76..b7cd42c 100644 | ||
--- a/src/CMakeLists.txt | ||
+++ b/src/CMakeLists.txt | ||
@@ -11,8 +11,10 @@ add_subdirectory(CubicInterpolation) | ||
add_subdirectory(detail) | ||
|
||
target_link_libraries(CubicInterpolation | ||
- CONAN_PKG::eigen | ||
- CONAN_PKG::boost | ||
+ Eigen3::Eigen | ||
+ Boost::boost | ||
+ Boost::filesystem | ||
+ Boost::serialization | ||
) | ||
|
||
target_include_directories(CubicInterpolation PUBLIC | ||
@@ -46,6 +48,3 @@ configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/Config.cmake.in | ||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/CubicInterpolationConfig.cmake | ||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/CubicInterpolation | ||
) | ||
- | ||
-install(FILES "${PROJECT_BINARY_DIR}/conanbuildinfo.cmake" | ||
- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/CubicInterpolation) |
11 changes: 0 additions & 11 deletions
11
recipes/cubicinterpolation/all/patches/patch_conanbuildinfo.txt
This file was deleted.
Oops, something went wrong.
15 changes: 15 additions & 0 deletions
15
recipes/cubicinterpolation/all/patches/rm_conan_basic_setup.diff
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,15 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index db6eb04..b319d33 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -9,8 +9,8 @@ set(CubicInterpolation_VERSION ${CubicInterpolation_VERSION_MAJOR}.${CubicInterp | ||
|
||
set(CMAKE_CXX_STANDARD 14) | ||
|
||
-include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) | ||
-conan_basic_setup(TARGETS) | ||
+find_package(Eigen3 REQUIRED) | ||
+find_package(Boost COMPONENTS filesystem serialization REQUIRED) | ||
|
||
add_subdirectory(src) | ||
|
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,17 +1,26 @@ | ||
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", "cmake_find_package_multi" | ||
generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" | ||
test_type = "explicit" | ||
|
||
def layout(self): | ||
cmake_layout(self) | ||
|
||
def requirements(self): | ||
self.requires(self.tested_reference_str) | ||
|
||
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") | ||
self.run(bin_path, 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") |
8 changes: 8 additions & 0 deletions
8
recipes/cubicinterpolation/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.1) | ||
project(test_package CXX) | ||
|
||
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) | ||
conan_basic_setup(TARGETS) | ||
|
||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ | ||
${CMAKE_CURRENT_BINARY_DIR}/test_package/) |
17 changes: 17 additions & 0 deletions
17
recipes/cubicinterpolation/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,17 @@ | ||
from conans import ConanFile, CMake, tools | ||
import os | ||
|
||
|
||
class TestPackageConan(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 tools.cross_building(self): | ||
bin_path = os.path.join("bin", "test_package") | ||
self.run(bin_path, run_environment=True) |