-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: support multiple inclusion (#25)
Signed-off-by: Henry Schreiner <[email protected]>
- Loading branch information
Showing
10 changed files
with
92 additions
and
14 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
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,9 @@ | ||
cmake_minimum_required(VERSION 3.24) | ||
|
||
project(test | ||
LANGUAGES Fortran C | ||
) | ||
|
||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") | ||
|
||
add_subdirectory(src) |
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,19 @@ | ||
add_subdirectory(subrepo) | ||
|
||
set (CMAKE_FIND_FRAMEWORK LAST) | ||
find_package( | ||
Python | ||
COMPONENTS Interpreter Development.Module NumPy | ||
REQUIRED) | ||
|
||
include(UseF2Py) | ||
|
||
message(STATUS "Building test f2py module") | ||
|
||
f2py_object_library(test_object OBJECT) | ||
f2py_generate_module(test_ test_py.F90 OUTPUT_VARIABLE test_files) | ||
python_add_library(test_ MODULE "${test_files}" WITH_SOABI) | ||
target_link_libraries(test_ PRIVATE test_object) | ||
install(TARGETS test_ DESTINATION lib/Python) | ||
|
||
message(STATUS "Done building test f2py module") |
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,9 @@ | ||
cmake_minimum_required(VERSION 3.24) | ||
|
||
project(test-subrepo | ||
LANGUAGES Fortran C | ||
) | ||
|
||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") | ||
|
||
add_subdirectory(src) |
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,18 @@ | ||
set(CMAKE_FIND_FRAMEWORK LAST) | ||
|
||
find_package( | ||
Python | ||
COMPONENTS Interpreter Development.Module NumPy | ||
REQUIRED) | ||
|
||
include(UseF2Py) | ||
|
||
message(STATUS "Building subrepo f2py module") | ||
|
||
f2py_object_library(subrepo_object OBJECT) | ||
f2py_generate_module(subrepo_ subrepo_py.F90 OUTPUT_VARIABLE subrepo_files) | ||
python_add_library(subrepo_ MODULE "${subrepo_files}" WITH_SOABI) | ||
target_link_libraries(subrepo_ PRIVATE subrepo_object) | ||
install(TARGETS subrepo_ DESTINATION lib/Python) | ||
|
||
message(STATUS "Done building subrepo f2py module") |
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,3 @@ | ||
subroutine bobo() | ||
print *, "bobo" | ||
end subroutine bobo |
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,3 @@ | ||
subroutine bobo() | ||
print *, "bobo" | ||
end subroutine bobo |
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