Skip to content

Commit

Permalink
out-of-source build only
Browse files Browse the repository at this point in the history
in-source build is broken for some generators
  • Loading branch information
SpaceIm committed Mar 8, 2021
1 parent ea9ccdd commit f6d292d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion recipes/onnx/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ class OnnxConan(ConanFile):
def _source_subfolder(self):
return "source_subfolder"

@property
def _build_subfolder(self):
return "build_subfolder"

def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC
Expand Down Expand Up @@ -73,7 +77,7 @@ def _configure_cmake(self):
self._cmake.definitions["ONNX_VERIFY_PROTO3"] = tools.Version(self.deps_cpp_info["protobuf"].version).major == "3"
if self.settings.compiler.get_safe("runtime"):
self._cmake.definitions["ONNX_USE_MSVC_STATIC_RUNTIME"] = str(self.settings.compiler.runtime) in ["MT", "MTd", "static"]
self._cmake.configure()
self._cmake.configure(build_folder=self._build_subfolder)
return self._cmake

def build(self):
Expand Down

0 comments on commit f6d292d

Please sign in to comment.