def generate(self, source_directory: Path, build_directory: Path, profile: str): args = [get_cmake_executable(), str(source_directory), '-DCMAKE_BUILD_TYPE=%s' % profile, '-B%s' % str(Path(build_directory, 'unix'))] args += self.get_cmake_args() exit_code = subprocess.call(" ".join(args), shell=True, cwd=str(source_directory)) if exit_code != 0: raise Exception("%s" % args)
def build(self, profile: str): target = 'helloworld' args = [get_cmake_executable(), '--build', str(self.build_directory), '--target', target, '--', '-j', '%d' % os.cpu_count()] exit_code = subprocess.call(args, cwd=str(self.build_directory)) if exit_code != 0: raise Exception("%s" % args) self.logger.info('Build completed, output %s', Path(self.build_directory, target))
def build(self, profile: str): args = [ get_cmake_executable(), '--build', str(self.build_directory), '--config', profile, '--', '-j', '%d' % os.cpu_count() ] exit_code = subprocess.call(args, cwd=str(self.build_directory)) if exit_code != 0: raise Exception("%s" % args) output_apps = list(self.build_directory.rglob("*exampleapp.app")) if len(output_apps) == 0: raise Exception('Oop! Something went wrong') self.logger.info('Build completed') for output_app in output_apps: self.logger.info('Output %s', Path(output_app))
def generate(self, source_directory: Path, build_directory: Path, profile: str): ios_directory = Path(build_directory, self.sub_directory) if ios_directory.exists(): return self.clone_project(ios_directory) cmake_tool_chain_path = Path(source_directory, 'cmake', 'utils', 'ios.toolchain.cmake') args = [ get_cmake_executable(), str(source_directory), '-B%s' % str(Path(build_directory, 'ios')) ] args += self.get_cmake_args(cmake_tool_chain_path, ios_directory) exit_code = subprocess.call(" ".join(args), shell=True, cwd=str(source_directory)) if exit_code != 0: raise Exception("%s" % args)