GoogleTest hello world.

./build and ./test work automatically when cwd is inside userland/libs/XXX
without --package-all.
This commit is contained in:
Ciro Santilli 六四事件 法轮功
2020-11-25 00:00:00 +00:00
parent 50570326d4
commit 39073519b1
11 changed files with 156 additions and 32 deletions

View File

@@ -10,16 +10,19 @@ build_userland = lkmc.import_path.import_path_relative_root('build-userland')
class Main(build_userland.Main):
def __init__(self):
defaults = {
'archs': [platform.processor()],
'gcc_which': 'host',
'in_tree': True,
'targets': ['.'],
}
if self.cwd_in_lib():
defaults['package_all'] = True
super().__init__(
description='''\
https://cirosantilli.com/linux-kernel-module-cheat#userland-setup-getting-started-natively
''',
defaults={
'archs': [platform.processor()],
'gcc_which': 'host',
'in_tree': True,
'targets': ['.'],
}
defaults=defaults
)
if __name__ == '__main__':