Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

refactor: change in structure of stdlib in order to compiler it using fypp script #675

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
arteevraina wants to merge 17 commits into fortran-lang:master
base: master
Choose a base branch
Loading
from arteevraina:structure-change
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
c46d76e
refactor: change in structure of stdlib in order to compiler it using...
arteevraina Sep 6, 2022
6d0bbbc
fix: skip tests in test_mean based on MAXRANK
arteevraina Sep 8, 2022
4e4b0d2
refactor: remove nmhash.c file
arteevraina Sep 8, 2022
21212c8
refactor: remove test_always_skip & test_always_fail files
arteevraina Sep 8, 2022
35ed9b6
fix: failing ci
arteevraina Sep 8, 2022
1608e14
fix: append include directory later
arteevraina Sep 8, 2022
d036311
fix: remove test_always_fail & test_always_skip declaration from CMak...
arteevraina Sep 9, 2022
0d4fc91
fix: failing ci for common.fypp
arteevraina Sep 9, 2022
e88c922
refactor: replace Rank 7 with Rank > 7
arteevraina Sep 9, 2022
9877ed4
fix: remove test_always_skip & test_always_fail reference from deploy...
arteevraina Sep 9, 2022
2a6c429
fix: fpm deployment script for removing files
arteevraina Sep 9, 2022
21748c0
fix: replace path of common.fypp
arteevraina Sep 9, 2022
f941556
fix: remove reference of common.fypp
arteevraina Sep 9, 2022
5904f32
Revert "fix: replace path of common.fypp"
arteevraina Sep 10, 2022
cdebc20
fix: fyflags by appending include directory
arteevraina Sep 10, 2022
2b63915
docs: added include directory in documentation markdown
arteevraina Sep 24, 2022
7c99e70
docs: added documentation regarding building with fypp script
arteevraina Sep 24, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions API-doc-FORD-file.md
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ project: Fortran-lang/stdlib
summary: A community driven standard library for (modern) Fortran
src_dir: src
include: src
include
exclude_dir: src/tests
output_dir: API-doc
page_dir: doc
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ list(
"-DPROJECT_VERSION_MAJOR=${PROJECT_VERSION_MAJOR}"
"-DPROJECT_VERSION_MINOR=${PROJECT_VERSION_MINOR}"
"-DPROJECT_VERSION_PATCH=${PROJECT_VERSION_PATCH}"
"-I${PROJECT_SOURCE_DIR}/include"
)

add_subdirectory(src)
Expand Down
15 changes: 15 additions & 0 deletions README.md
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,21 @@ To use `stdlib` within your `fpm` project, add the following lines to your `fpm.
stdlib = { git="https://github.com/fortran-lang/stdlib", branch="stdlib-fpm" }
```

### Build with [fypp-script](https://github.com/fortran-lang/fpm/pull/729)

Fortran Package Manager has a compiler wrapper `fypp-script` that can be used to compile stdlib without
switching to `stdlib-fpm` branch.

```sh
git clone https://github.com/fortran-lang/fpm.git
```
Comment on lines +207 to +209
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is that provided? IMO a link to fpm should be sufficient.


```
fpm run -- build --compiler "$PWD/fypp-gfortran.py" -C stdlib
```

**Note** : At this stage, building using `stdlib-fpm` branch should be the preferred way of using `stdlib` with `fpm`.

## Using stdlib in your project

The stdlib project exports CMake package files and pkg-config files to make stdlib usable for other projects.
Expand Down
5 changes: 1 addition & 4 deletions ci/fpm-deployment.sh
100644 → 100755
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,14 @@ include=(

# Files to remove from collection
prune=(
"$destdir/test/test_always_fail.f90"
"$destdir/test/test_always_skip.f90"
"$destdir/test/test_hash_functions.f90"
"$destdir/src/common.f90"
"$destdir/src/f18estop.f90"
)

major=$(cut -d. -f1 VERSION)
minor=$(cut -d. -f2 VERSION)
patch=$(cut -d. -f3 VERSION)
fyflags="${fyflags} -DPROJECT_VERSION_MAJOR=${major} -DPROJECT_VERSION_MINOR=${minor} -DPROJECT_VERSION_PATCH=${patch}"
fyflags="${fyflags} -DPROJECT_VERSION_MAJOR=${major} -DPROJECT_VERSION_MINOR=${minor} -DPROJECT_VERSION_PATCH=${patch} -I include"

mkdir -p "$destdir/src" "$destdir/test" "$destdir/example"

Expand Down
16 changes: 16 additions & 0 deletions fpm.toml
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name = "stdlib"

[dev-dependencies]
test-drive.git = "https://github.com/fortran-lang/test-drive.git"

[build]
auto-examples = false
auto-tests = true

[preprocess.cpp]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be

Suggested change
[preprocess.cpp]
[preprocess.fypp]

?
As far as I remember, CPP is not used within stdlib.

Copy link
Member Author

@arteevraina arteevraina Sep 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that is not used. But, we have not enabled fypp inside fpm as of now. So, it cannot identity it as a valid preprocessor. Considering fypp-gfortran.py as a temporary solution, I think when we have fypp integrated inside fpm then I think we should rename it as fypp instead of cpp.

macros = [
"PROJECT_VERSION_MAJOR=0",
"PROJECT_VERSION_MINOR=1",
"PROJECT_VERSION_PATCH=0",
Comment on lines +12 to +14
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we support extracting those values automatically in fpm?

Copy link
Member Author

@arteevraina arteevraina Sep 26, 2022
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think we should add support to extract them for the version number ?
I will take up this task.

awvwgk and jvdp1 reacted with thumbs up emoji
Copy link
Member Author

@arteevraina arteevraina Oct 2, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR created for this fortran-lang/fpm#766

awvwgk and jvdp1 reacted with rocket emoji
"MAXRANK=4",
]
File renamed without changes.
2 changes: 1 addition & 1 deletion src/f08estop.f90
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
submodule (stdlib_error) estop
submodule (stdlib_error) f08estop

implicit none

Expand Down
4 changes: 2 additions & 2 deletions src/f18estop.f90
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
submodule (stdlib_error) estop
submodule (stdlib_error) f18estop

implicit none

Expand Down Expand Up @@ -26,4 +26,4 @@
endif
end procedure

end submodule estop
end submodule f18estop
10 changes: 0 additions & 10 deletions test/CMakeLists.txt
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ macro(ADDTEST name)
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
endmacro(ADDTEST)

list(
APPEND fyppFlags
"-I${PROJECT_SOURCE_DIR}/src"
)

add_subdirectory(array)
add_subdirectory(ascii)
add_subdirectory(bitsets)
Expand All @@ -34,8 +29,3 @@ add_subdirectory(system)
add_subdirectory(quadrature)
add_subdirectory(math)
add_subdirectory(stringlist)

ADDTEST(always_skip)
set_tests_properties(always_skip PROPERTIES SKIP_RETURN_CODE 77)
ADDTEST(always_fail)
set_tests_properties(always_fail PROPERTIES WILL_FAIL true)
8 changes: 0 additions & 8 deletions test/hash_functions/nmhash.c
View file Open in desktop

This file was deleted.

Loading

AltStyle によって変換されたページ (->オリジナル) /