Skip to content

Commit

Permalink
embag: fix a portability bug
Browse files Browse the repository at this point in the history
  • Loading branch information
valgur committed May 15, 2023
1 parent f632c60 commit ed84a0a
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion recipes/embag/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from conan import ConanFile
from conan.tools.build import check_min_cppstd
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
from conan.tools.files import get, copy, rm
from conan.tools.files import get, copy, rm, replace_in_file

required_conan_version = ">=1.53.0"

Expand Down Expand Up @@ -67,7 +67,17 @@ def generate(self):
deps = CMakeDeps(self)
deps.generate()

def _patch_sources(self):
# Non-namespaced make_unique is ambiguous in MSVC
replace_in_file(
self,
os.path.join(self.source_folder, "lib", "embag.h"),
" make_unique",
" std::make_unique",
)

def build(self):
self._patch_sources()
cmake = CMake(self)
cmake.configure()
cmake.build()
Expand Down

0 comments on commit ed84a0a

Please sign in to comment.