-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #214 from shaoxc/master
Add meson for examples to support python3.12 and new numpy
- Loading branch information
Showing
42 changed files
with
495 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
include ../make.meson.inc | ||
|
||
NAME := arrayderivedtype | ||
WRAPFLAGS += -k kind_map | ||
|
||
test: build | ||
$(PYTHON) tests.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
include ../make.meson.inc | ||
|
||
NAME := ExampleArray_pkg | ||
NAME2 := ExampleArray_relative | ||
NAME3 := ExampleArray_top | ||
WRAPFLAGS += -k kind_map -P | ||
MAKEFILE := $(lastword $(MAKEFILE_LIST)) | ||
|
||
test: build2 | ||
$(PYTHON) tests.py | ||
|
||
build2_pre: build | ||
$(eval WRAPFLAGS += --relative) | ||
$(MAKE) -f $(MAKEFILE) build NAME=$(NAME2) WRAPFLAGS="$(WRAPFLAGS)" | ||
|
||
build2: build2_pre | ||
mkdir ${NAME3} | ||
mv ${NAME2}/ _${NAME2}.*so ${NAME3}/ | ||
touch ${NAME3}/__init__.py | ||
|
||
clean: | ||
$(MAKE) -f $(MAKEFILE) clean NAME=$(NAME) | ||
$(MAKE) -f $(MAKEFILE) clean NAME=$(NAME2) | ||
$(MAKE) -f $(MAKEFILE) clean NAME=$(NAME3) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
include ../make.meson.inc | ||
|
||
NAME := ExampleArray | ||
NAME2 := ExampleArray_pkg | ||
WRAPFLAGS += -k kind_map | ||
MAKEFILE := $(lastword $(MAKEFILE_LIST)) | ||
|
||
test: build2 | ||
$(PYTHON) tests.py | ||
|
||
build2: build | ||
$(MAKE) -f $(MAKEFILE) build NAME=$(NAME2) WRAPFLAGS="$(WRAPFLAGS) -P" | ||
|
||
clean: | ||
$(MAKE) -f $(MAKEFILE) clean NAME=$(NAME) | ||
$(MAKE) -f $(MAKEFILE) clean NAME=$(NAME2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
include ../make.meson.inc | ||
|
||
NAME := issue50 | ||
|
||
test: build | ||
$(PYTHON) tests.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
include ../make.meson.inc | ||
|
||
NAME := CBF | ||
NAME2 := CBF_pkg | ||
MAKEFILE := $(lastword $(MAKEFILE_LIST)) | ||
|
||
test: build2 | ||
$(PYTHON) tests.py | ||
|
||
build2: build | ||
$(MAKE) -f $(MAKEFILE) build NAME=$(NAME2) WRAPFLAGS="$(WRAPFLAGS) -P" | ||
|
||
clean: | ||
$(MAKE) -f $(MAKEFILE) clean NAME=$(NAME) | ||
$(MAKE) -f $(MAKEFILE) clean NAME=$(NAME2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
include ../make.meson.inc | ||
|
||
NAME := classnames | ||
WRAPFLAGS += -k kind_map --class-names class_names.json | ||
|
||
test: build | ||
$(PYTHON) tests.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
include ../make.meson.inc | ||
|
||
NAME := Example | ||
NAME2 := Example_pkg | ||
WRAPFLAGS += -k kind_map | ||
MAKEFILE := $(lastword $(MAKEFILE_LIST)) | ||
|
||
test: build | ||
$(PYTHON) tests.py | ||
|
||
build2: build | ||
$(MAKE) -f $(MAKEFILE) build NAME=$(NAME2) WRAPFLAGS="$(WRAPFLAGS) -P" | ||
|
||
clean: | ||
$(MAKE) -f $(MAKEFILE) clean NAME=$(NAME) | ||
$(MAKE) -f $(MAKEFILE) clean NAME=$(NAME2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
include ../make.meson.inc | ||
|
||
NAME := testmodule | ||
F90FLAGS += -fdefault-integer-8 | ||
WRAPFLAGS += -k kind_map -P | ||
|
||
test: build | ||
$(PYTHON) tests.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
include ../make.meson.inc | ||
|
||
NAME := mytype | ||
NAME2 := othertype | ||
WRAPFLAGS += -k kind_map | ||
MAKEFILE := $(lastword $(MAKEFILE_LIST)) | ||
|
||
test: build2 | ||
$(PYTHON) tests.py | ||
|
||
build1: | ||
$(eval LIBSRC_WRAP_FILES := mytype_mod.f90) | ||
@ rm -rf f90wrap_*.f90 | ||
$(MAKE) -f $(MAKEFILE) build NAME=$(NAME) WRAPFLAGS="$(WRAPFLAGS)" LIBSRC_WRAP_FILES=$(LIBSRC_WRAP_FILES) | ||
|
||
build2: build1 | ||
$(eval LIBSRC_WRAP_FILES := othertype_mod.f90) | ||
@ rm -rf f90wrap_*.f90 | ||
$(MAKE) -f $(MAKEFILE) build NAME=$(NAME2) WRAPFLAGS="$(WRAPFLAGS)" LIBSRC_WRAP_FILES=$(LIBSRC_WRAP_FILES) | ||
|
||
clean: | ||
$(MAKE) -f $(MAKEFILE) clean NAME=$(NAME) | ||
$(MAKE) -f $(MAKEFILE) clean NAME=$(NAME2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
include ../make.meson.inc | ||
|
||
NAME := ExampleDerivedTypes | ||
NAME2 := ExampleDerivedTypes_pkg | ||
WRAPFLAGS += -k kind_map | ||
MAKEFILE := $(lastword $(MAKEFILE_LIST)) | ||
|
||
test: build2 | ||
${PYTHON} tests.py | ||
${PYTHON} tests_pkg.py | ||
|
||
build2: build | ||
$(MAKE) -f $(MAKEFILE) build NAME=$(NAME2) WRAPFLAGS="$(WRAPFLAGS) -P" | ||
|
||
clean: | ||
$(MAKE) -f $(MAKEFILE) clean NAME=$(NAME) | ||
$(MAKE) -f $(MAKEFILE) clean NAME=$(NAME2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
include ../make.meson.inc | ||
|
||
NAME := library | ||
|
||
test: build | ||
$(PYTHON) tests.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
include ../make.meson.inc | ||
|
||
NAME := pywrapper | ||
MAKEFILE := $(lastword $(MAKEFILE_LIST)) | ||
|
||
LIBSRC_WRAP_FPP_FILES := main.f90 | ||
|
||
test: build1 | ||
$(PYTHON) docstring_test.py | ||
|
||
build1: | ||
$(MAKE) -f $(MAKEFILE) build NAME=$(NAME) LIBSRC_WRAP_FPP_FILES=$(LIBSRC_WRAP_FPP_FILES) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
include ../make.meson.inc | ||
|
||
NAME := elmod | ||
WRAPFLAGS += -k kind_map | ||
|
||
test: build | ||
$(PYTHON) test.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
include ../make.meson.inc | ||
|
||
NAME := ExampleDerivedTypes | ||
NAME2 := ExampleDerivedTypes_pkg | ||
WRAPFLAGS += -k kind_map | ||
MAKEFILE := $(lastword $(MAKEFILE_LIST)) | ||
|
||
test: build2 | ||
#${PYTHON} tests.py | ||
#${PYTHON} tests_pkg.py | ||
|
||
build2: build | ||
$(MAKE) -f $(MAKEFILE) build NAME=$(NAME2) WRAPFLAGS="$(WRAPFLAGS) -P" | ||
|
||
clean: | ||
$(MAKE) -f $(MAKEFILE) clean NAME=$(NAME) | ||
$(MAKE) -f $(MAKEFILE) clean NAME=$(NAME2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
include ../make.meson.inc | ||
|
||
NAME := mockdt | ||
NAME2 := mockdtpkg | ||
WRAPFLAGS += -k kind_map | ||
MAKEFILE := $(lastword $(MAKEFILE_LIST)) | ||
|
||
LIBSRC_WRAP_FILES := $(shell find ./ -name '*.F90') | ||
|
||
test: build2 | ||
$(PYTHON) test_module.py | ||
$(PYTHON) test_package.py | ||
|
||
build2: | ||
@ rm -rf f90wrap_*.f90 | ||
$(MAKE) -f $(MAKEFILE) build NAME=$(NAME) WRAPFLAGS="$(WRAPFLAGS)" LIBSRC_WRAP_FILES="$(LIBSRC_WRAP_FILES)" | ||
@ rm -rf f90wrap_*.f90 | ||
$(MAKE) -f $(MAKEFILE) build NAME=$(NAME2) WRAPFLAGS="$(WRAPFLAGS) -P" LIBSRC_WRAP_FILES="$(LIBSRC_WRAP_FILES)" | ||
|
||
clean: | ||
$(MAKE) -f $(MAKEFILE) clean NAME=$(NAME) | ||
$(MAKE) -f $(MAKEFILE) clean NAME=$(NAME2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
include ../make.meson.inc | ||
|
||
NAME := testextends | ||
|
||
test: build | ||
$(PYTHON) testextends.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
include ../make.meson.inc | ||
|
||
NAME := test_python | ||
WRAPFLAGS += --default-to-inout | ||
|
||
test: build | ||
$(PYTHON) tests.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
include ../make.meson.inc | ||
|
||
NAME := example | ||
NAME2 := examplepkg | ||
MAKEFILE := $(lastword $(MAKEFILE_LIST)) | ||
|
||
test: build2 | ||
$(PYTHON) test.py | ||
$(PYTHON) test_pkg.py | ||
|
||
build2: build | ||
$(MAKE) -f $(MAKEFILE) build NAME=$(NAME2) WRAPFLAGS=-P | ||
|
||
clean: | ||
$(MAKE) -f $(MAKEFILE) clean NAME=$(NAME) | ||
$(MAKE) -f $(MAKEFILE) clean NAME=$(NAME2) |
6 changes: 6 additions & 0 deletions
6
examples/issue105_function_definition_with_empty_lines/Makefile.meson
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
include ../make.meson.inc | ||
|
||
NAME := itest | ||
|
||
test: build | ||
$(PYTHON) run.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
include ../make.meson.inc | ||
|
||
NAME := itest | ||
|
||
test: build | ||
$(PYTHON) run.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
include ../make.meson.inc | ||
|
||
NAME := test | ||
|
||
test: build | ||
$(PYTHON) -c 'import test; test.foo(1.0, 2)' |
Oops, something went wrong.