osmith has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-dev/+/42974?usp=email )

Change subject: Add 'onomondo-ipa' project
......................................................................

Add 'onomondo-ipa' project

Related: SYS#8101
Related: onomondo-ipa Id2c61e754c59fe1d4d59f61de2745bab6543fba2
Change-Id: I732e63625943b20989001102c7447d0e0a62af5a
---
M all.buildsystems
M all.deps
M gen_makefile.py
3 files changed, 36 insertions(+), 1 deletion(-)

Approvals:
  jolly: Looks good to me, but someone else must approve
  osmith: Looks good to me, approved
  fixeria: Looks good to me, but someone else must approve
  Jenkins Builder: Verified




diff --git a/all.buildsystems b/all.buildsystems
index 9b27105..2e3281b 100644
--- a/all.buildsystems
+++ b/all.buildsystems
@@ -5,6 +5,7 @@
 osmo-epdg      erlang
 osmo_dia2gsup  erlang
 onomondo-eim   erlang
+onomondo-ipa   cmake

 comp128-python python
 gsm0338                python
diff --git a/all.deps b/all.deps
index 8377998..7dcb3b7 100644
--- a/all.deps
+++ b/all.deps
@@ -45,6 +45,7 @@
 open5gs

 onomondo-eim
+onomondo-ipa

 # can only clone these
 docker-playground
diff --git a/gen_makefile.py b/gen_makefile.py
index 4ee5290..e890b7c 100755
--- a/gen_makefile.py
+++ b/gen_makefile.py
@@ -349,7 +349,7 @@
   sync
   touch $@
     '''
-  elif buildsystem in ["meson", "erlang", "python"]:
+  elif buildsystem in ["meson", "erlang", "python", "cmake"]:
     return ""
   else:
     assert False, f"unknown buildsystem: {buildsystem}"
@@ -385,6 +385,18 @@
   sync
   touch $@
     '''
+  elif buildsystem == "cmake":
+    return f'''
+.make.{proj}.configure: .make.{proj}.clone {deps_installed} 
$({proj}_configure_files)
+  @echo "\\n\\n\\n===== $@\\n"
+  -chmod -R ug+w {build_proj}
+  -rm -rf {build_proj}
+  mkdir -p {build_proj}
+  cd {build_proj}; cmake -S {build_to_src} -B . \\
+      -DCMAKE_INSTALL_PREFIX={shlex.quote(args.install_prefix)}
+  sync
+  touch $@
+    '''
   elif buildsystem in ["erlang", "python"]:
     return f'''
 .make.{proj}.configure: .make.{proj}.clone {deps_installed}
@@ -443,6 +455,18 @@
   sync
   touch $@
     '''
+  elif buildsystem == "cmake":
+    test_cmd = ""
+    if args.make_check:
+      test_cmd = f"ctest --test-dir {shlex.quote(build_proj)}"
+    return f'''
+.make.{proj}.build: .make.{proj}.configure $({proj}_files)
+  @echo "\\n\\n\\n===== $@\\n"
+  cmake --build {shlex.quote(build_proj)} -j {args.jobs}
+  {test_cmd}
+  sync
+  touch $@
+    '''
   else:
     assert False, f"unknown buildsystem: {buildsystem}"

@@ -499,6 +523,14 @@
   sync
   touch $@
     '''
+  elif buildsystem == "cmake":
+    return f'''
+.make.{proj}.install: .make.{proj}.build
+  @echo "\\n\\n\\n===== $@\\n"
+  cmake --install {shlex.quote(build_proj)}
+  sync
+  touch $@
+    '''
   else:
     assert False, f"unknown buildsystem: {buildsystem}"

@@ -574,6 +606,7 @@

 {proj}_configure_files := $(shell find -L {src_proj} \\
     -name "Makefile.am" \\
+    -or -name "CMakeLists.txt" \\
     -or -name "*.in" \\
     -and -not -name "Makefile.in" \\
     -and -not -name "config.h.in" 2>/dev/null)

--
To view, visit https://gerrit.osmocom.org/c/osmo-dev/+/42974?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-Change-Id: I732e63625943b20989001102c7447d0e0a62af5a
Gerrit-Change-Number: 42974
Gerrit-PatchSet: 4
Gerrit-Owner: osmith <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: jolly <[email protected]>
Gerrit-Reviewer: osmith <[email protected]>

Reply via email to