Skip to content

Commit

Permalink
Set compiler.libcxx (#141)
Browse files Browse the repository at this point in the history
Signed-off-by: junjie.jiang <[email protected]>
  • Loading branch information
junjiejiangjjj authored May 24, 2024
1 parent 50447b9 commit b7d3e1a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ def configure(self):
if self.settings.os == "Macos":
self.options["arrow"].with_jemalloc = False

if self.settings.compiler == "gcc":
if self.settings.compiler.libcxx == "libstdc++":
raise Exception("This package is only compatible with libstdc++11")

def requirements(self):
if self.settings.os != "Macos":
self.requires("libunwind/1.7.2")
Expand All @@ -81,4 +85,5 @@ def imports(self):

def build(self):
target = "11.0"
self.run("export MACOSX_DEPLOYMENT_TARGET={}".format(target))
self.run("export MACOSX_DEPLOYMENT_TARGET={}".format(target))

7 changes: 6 additions & 1 deletion python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,12 @@ def run(self):
extdir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
env = os.environ
env['LD_LIBRARY_PATH'] = os.path.join(build_temp, 'lib')
subprocess.check_call(['conan', 'install', extdir, '--build=missing', '-s', 'build_type=Release'], cwd=build_temp, env=env)
if sys.platform.lower() == 'linux':
subprocess.check_call(['conan', 'install', extdir, '--build=missing', '-s', 'build_type=Release', '-s', 'compiler.libcxx=libstdc++11'],
cwd=build_temp, env=env)
else:
# macos
subprocess.check_call(['conan', 'install', extdir, '--build=missing', '-s', 'build_type=Release'], cwd=build_temp, env=env)
# apply patch
subprocess.check_call(['git', 'restore', '.'], cwd=MILVUS_ROOT)
subprocess.check_call(['git', 'apply', MILVUS_PATCH], cwd=MILVUS_ROOT)
Expand Down

0 comments on commit b7d3e1a

Please sign in to comment.