Skip to content

Commit

Permalink
Configuration update for macOS.
Browse files Browse the repository at this point in the history
  • Loading branch information
bdolinar committed Dec 11, 2024
1 parent 832e5a4 commit 6132b6c
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions xmsconan/package_tools/packager.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
'compiler.cppstd': ['17'],
'compiler.version': ['192'],
'compiler.runtime': ['dynamic', 'static'],
'arch': ['x86_64'],
},
'linux':{
'os': ['Linux'],
Expand All @@ -26,22 +25,21 @@
'arch': ['x86_64'],
'compiler': ['gcc'],
'compiler.version': ['7'],
'arch': ['x86_64'],
},
'darwin':{ # macos
'os': ['Macos'],
'cppstd': ['gnu17'],
'build_type': ['Release', 'Debug'],
'arch': ['x86_64'],
'arch': ['armv8'],
'compiler': ['apple-clang'],
'compiler.version': ['14'],
'arch': ['x86_64'],
'compiler.version': ['16'],
'compiler.cppstd': ['gnu17'],
'compiler.libcxx': ['libc++'],
},
}


class XmsConanPackager(object):

def __init__(self, libary_name, conanfile_path='.'):
self._library_name = libary_name
self._conanfile_path = conanfile_path
Expand All @@ -56,7 +54,7 @@ def __del__(self):
@property
def library_name(self):
return self._library_name

@property
def configurations(self):
return self._configurations
Expand All @@ -65,7 +63,7 @@ def get_builder(self):
if self._builder is None:
self._builder = self._get_builder()
return self._builder

def _get_builder(self):
builder = None
return builder
Expand Down Expand Up @@ -144,7 +142,7 @@ def generate_configurations(self, system_platform=None):

self._configurations = combinations
return combinations

def run(self):
self.printer.print_ascci_art()
self.print_configuration_table(self.configurations)
Expand All @@ -156,7 +154,7 @@ def run(self):
self.printer.print_profile(profile_path)
cmd = ['conan', 'create', self._conanfile_path, '--profile', profile_path]
try:
subprocess.call(cmd, shell=True)
subprocess.call(cmd)
self.printer.print_message(f'Finished building configuration {i+1} of {len(self.configurations)}')
except subprocess.CalledProcessError as e:
self.printer.print_message(f'ERROR building configuration {i+1} of {len(self.configurations)}')
Expand Down Expand Up @@ -191,7 +189,7 @@ def create_build_profile(self, configuration):
# For example, you can print the path to the temporary profile file
print(f'Temporary profile created at: {temp_profile_path}')
return temp_profile_path

def print_configuration_table(self, configurations):
headers = ["#", "cppstd", "build_type", "compiler", "compiler.version", "arch", "xmscore:wchar_t", "xmscore:pybind", "xmscore:testing"]
table = []
Expand Down

0 comments on commit 6132b6c

Please sign in to comment.