Skip to content

Commit

Permalink
small_gicp: fix a Clang / libc++ compilation error
Browse files Browse the repository at this point in the history
  • Loading branch information
valgur committed Apr 19, 2024
1 parent b7425a1 commit 445e1af
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
6 changes: 6 additions & 0 deletions recipes/small_gicp/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,9 @@ sources:
"cci.20240417":
url: "https://github.com/koide3/small_gicp/archive/b85d2469d3456ef18a92e677a3bbfe85536135d9.zip"
sha256: "2521d12c60010952eca302d54ad71bfe6ce4522ff8718ed5ce0e03935e2eddb7"
patches:
"cci.20240417":
- patch_file: "patches/001-fix-missing-include.patch"
patch_type: "portability"
patch_description: "Fix a missing include"
patch_source: "https://github.com/koide3/small_gicp/pull/32"
6 changes: 5 additions & 1 deletion recipes/small_gicp/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from conan.tools.build import check_min_cppstd
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
from conan.tools.env import VirtualBuildEnv
from conan.tools.files import copy, get, rm, rmdir, download
from conan.tools.files import copy, get, rm, rmdir, download, export_conandata_patches, apply_conandata_patches
from conan.tools.microsoft import is_msvc
from conan.tools.scm import Version
import os
Expand Down Expand Up @@ -46,6 +46,9 @@ def _compilers_minimum_version(self):
"msvc": "191",
}

def export_sources(self):
export_conandata_patches(self)

def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC
Expand Down Expand Up @@ -97,6 +100,7 @@ def generate(self):
deps.generate()

def build(self):
apply_conandata_patches(self)
cmake = CMake(self)
cmake.configure()
cmake.build()
Expand Down
11 changes: 11 additions & 0 deletions recipes/small_gicp/all/patches/001-fix-missing-include.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
diff --git a/include/small_gicp/benchmark/read_points.hpp b/include/small_gicp/benchmark/read_points.hpp
--- a/include/small_gicp/benchmark/read_points.hpp (revision b85d2469d3456ef18a92e677a3bbfe85536135d9)
+++ b/include/small_gicp/benchmark/read_points.hpp (date 1712127101513)
@@ -4,6 +4,7 @@

#include <fstream>
#include <iostream>
+#include <vector>
#include <Eigen/Core>

namespace small_gicp {

0 comments on commit 445e1af

Please sign in to comment.