summaryrefslogtreecommitdiffstats
path: root/external/poky/meta-selftest/recipes-test/fortran/fortran-helloworld.bb
diff options
context:
space:
mode:
authortakeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp>2020-11-02 11:07:33 +0900
committertakeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp>2020-11-02 11:07:33 +0900
commit1c7d6584a7811b7785ae5c1e378f14b5ba0971cf (patch)
treecd70a267a5ef105ba32f200aa088e281fbd85747 /external/poky/meta-selftest/recipes-test/fortran/fortran-helloworld.bb
parent4204309872da5cb401cbb2729d9e2d4869a87f42 (diff)
recipes
Diffstat (limited to 'external/poky/meta-selftest/recipes-test/fortran/fortran-helloworld.bb')
-rw-r--r--external/poky/meta-selftest/recipes-test/fortran/fortran-helloworld.bb24
1 files changed, 24 insertions, 0 deletions
diff --git a/external/poky/meta-selftest/recipes-test/fortran/fortran-helloworld.bb b/external/poky/meta-selftest/recipes-test/fortran/fortran-helloworld.bb
new file mode 100644
index 00000000..3a464044
--- /dev/null
+++ b/external/poky/meta-selftest/recipes-test/fortran/fortran-helloworld.bb
@@ -0,0 +1,24 @@
+SUMMARY = "Fortran Hello World"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+DEPENDS = "libgfortran"
+
+SRC_URI = "file://hello.f95"
+
+# These set flags that Fortran doesn't support
+SECURITY_CFLAGS = ""
+SECURITY_LDFLAGS = ""
+
+do_compile() {
+ ${FC} ${LDFLAGS} ${WORKDIR}/hello.f95 -o ${B}/fortran-hello
+}
+
+do_install() {
+ install -D ${B}/fortran-hello ${D}${bindir}/fortran-hello
+}
+
+python () {
+ if not d.getVar("FORTRAN"):
+ raise bb.parse.SkipRecipe("Fortran isn't enabled")
+}