Skip to content

Commit 929d5c1

Browse files
committed
Merge remote-tracking branch 'upstream/master' into median
2 parents 3342c6a + 88adb9f commit 929d5c1

25 files changed

+577
-106
lines changed

.github/workflows/CI.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
fail-fast: false
2222
matrix:
2323
os: [ubuntu-latest, macos-latest]
24-
gcc_v: [7, 8, 9, 10, 11] # Version of GFortran we want to use.
24+
gcc_v: [9, 10, 11] # Version of GFortran we want to use.
2525
env:
2626
FC: gfortran-${{ matrix.gcc_v }}
2727
GCC_V: ${{ matrix.gcc_v }}

.github/workflows/ci_windows.yml

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -7,41 +7,6 @@ env:
77
CTEST_TIME_TIMEOUT: "5" # some failures hang forever
88

99
jobs:
10-
Build:
11-
runs-on: windows-latest
12-
strategy:
13-
fail-fast: false
14-
15-
steps:
16-
- uses: actions/checkout@v1
17-
18-
- name: Install fypp
19-
run: pip install fypp
20-
21-
- run: cmake -G "MinGW Makefiles" -DCMAKE_SH="CMAKE_SH-NOTFOUND" -Wdev -B build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_Fortran_FLAGS_DEBUG="-Wall -Wextra -Wimplicit-interface -fPIC -g -fcheck=all -fbacktrace" -DCMAKE_MAXIMUM_RANK=4
22-
23-
env:
24-
FC: gfortran
25-
CC: gcc
26-
CXX: g++
27-
28-
- name: CMake build
29-
run: cmake --build build --parallel
30-
31-
- name: catch build fail
32-
run: cmake --build build --verbose --parallel 1
33-
if: failure()
34-
35-
- name: CTest
36-
run: ctest --output-on-failure --parallel -V -LE quadruple_precision
37-
working-directory: build
38-
39-
- uses: actions/upload-artifact@v1
40-
if: failure()
41-
with:
42-
name: WindowsCMakeTestlog
43-
path: build/Testing/Temporary/LastTest.log
44-
4510
msys2-build:
4611
runs-on: windows-latest
4712
strategy:

CMakeLists.txt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ add_subdirectory(config)
1616

1717
# --- compiler options
1818
if(CMAKE_Fortran_COMPILER_ID STREQUAL GNU)
19+
if(CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 9.0)
20+
message(FATAL_ERROR "GCC Version 9 or newer required")
21+
endif()
1922
add_compile_options(-fimplicit-none)
2023
add_compile_options(-ffree-line-length-132)
2124
add_compile_options(-Wall)
@@ -27,11 +30,7 @@ if(CMAKE_Fortran_COMPILER_ID STREQUAL GNU)
2730
if(CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 11.0)
2831
add_compile_options(-pedantic-errors)
2932
endif()
30-
if(CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL 8.0)
31-
add_compile_options(-std=f2018)
32-
else()
33-
add_compile_options(-std=f2008ts)
34-
endif()
33+
add_compile_options(-std=f2018)
3534
elseif(CMAKE_Fortran_COMPILER_ID STREQUAL Intel)
3635
add_compile_options(-warn declarations,general,usage,interfaces,unused)
3736
if(CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 18.0)

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,8 @@ The following combinations are tested on the default branch of stdlib:
8787

8888
Name | Version | Platform | Architecture
8989
--- | --- | --- | ---
90-
GCC Fortran | 7, 8, 9, 10, 11 | Ubuntu 20.04 | x86_64
91-
GCC Fortran | 7, 8, 9, 10, 11 | MacOS Catalina 10.15 | x86_64
92-
GCC Fortran | 8 | Windows Server 2019 | x86_64
90+
GCC Fortran | 9, 10, 11 | Ubuntu 20.04 | x86_64
91+
GCC Fortran | 9, 10, 11 | MacOS Catalina 10.15 | x86_64
9392
GCC Fortran (MSYS) | 10 | Windows Server 2019 | x86_64
9493
GCC Fortran (MinGW) | 10 | Windows Server 2019 | x86_64, i686
9594
Intel oneAPI classic | 2021.1 | Ubuntu 20.04 | x86_64
@@ -106,7 +105,7 @@ A list of tested compilers which are currently not working and the respective is
106105

107106
Name | Version | Platform | Architecture | Status
108107
--- | --- | --- | --- | ---
109-
GCC Fortran | 7.4 | Windows 10 | i686 | [#296](https://github.com/fortran-lang/stdlib/issues/296)
108+
GCC Fortran | <9 | any | any | [#296](https://github.com/fortran-lang/stdlib/issues/296), [#430](https://github.com/fortran-lang/stdlib/pull/430)
110109
NVIDIA HPC SDK | 20.7, 20.9, 20.11 | Manjaro Linux 20 | x86_64 | [#107](https://github.com/fortran-lang/stdlib/issues/107)
111110
NAG | 7.0 | RHEL | x86_64 | [#108](https://github.com/fortran-lang/stdlib/issues/108)
112111
Intel Parallel Studio XE | 16, 17, 18 | OpenSUSE | x86_64 | failed to compile

config/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# SPDX-Identifier: MIT
22

3+
option(
4+
CMAKE_INSTALL_MODULEDIR
5+
"Directory in prefix to install generated module files"
6+
"${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}/${CMAKE_Fortran_COMPILER_ID}-${CMAKE_Fortran_COMPILER_VERSION}"
7+
)
8+
39
# Export a pkg-config file
410
configure_file(
511
"${CMAKE_CURRENT_SOURCE_DIR}/template.pc"

config/template.pc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
prefix=@CMAKE_INSTALL_PREFIX@
22
libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
33
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
4+
moduledir=${prefix}/@CMAKE_INSTALL_MODULEDIR@
45

56
Name: @PROJECT_NAME@
67
Description: @PROJECT_DESCRIPTION@
78
Version: @PROJECT_VERSION@
89
Libs: -L${libdir} -l@PROJECT_NAME@
9-
Cflags: -I${includedir}
10+
Cflags: -I${includedir} -I${moduledir}

doc/specs/index.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ This is and index/directory of the specifications (specs) for each new module/fe
1515
- [bitsets](./stdlib_bitsets.html) - Bitset data types and procedures
1616
- [error](./stdlib_error.html) - Catching and handling errors
1717
- [IO](./stdlib_io.html) - Input/output helper & convenience
18+
- [kinds](./stdlib_kinds.html) - Kind parameters
1819
- [linalg](./stdlib_linalg.html) - Linear Algebra
1920
- [logger](./stdlib_logger.html) - Runtime logging system
2021
- [optval](./stdlib_optval.html) - Fallback value for optional arguments
@@ -25,10 +26,6 @@ This is and index/directory of the specifications (specs) for each new module/fe
2526
- [string\_type](./stdlib_string_type.html) - Basic string support
2627
- [strings](./stdlib_strings.html) - String handling and manipulation routines
2728

28-
## Missing specs
29-
30-
- [kinds](https://github.com/fortran-lang/stdlib/blob/master/src/stdlib_kinds.f90)
31-
3229
## Released/Stable Features & Modules
3330

3431
- (None yet)

doc/specs/stdlib_kinds.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
title: kinds
3+
---
4+
5+
# The `stdlib_kinds` module
6+
7+
[TOC]
8+
9+
## Introduction
10+
11+
The `stdlib_kinds` module provides kind parameters for the Fortran intrinsic data types,
12+
*integer*, *logical*, *real*, and *complex*.
13+
14+
15+
## Constants provided by `stdlib_kinds`
16+
17+
### `sp`
18+
19+
Alias for intrinsic named constant `real32` imported from `iso_fortran_env`.
20+
21+
22+
### `dp`
23+
24+
Alias for intrinsic named constant `real64` imported from `iso_fortran_env`.
25+
26+
27+
### `qp`
28+
29+
Alias for intrinsic named constant `real128` imported from `iso_fortran_env`.
30+
31+
32+
### `int8`
33+
34+
Reexported intrinsic named constant `int8` from `iso_fortran_env`.
35+
36+
37+
### `int16`
38+
39+
Reexported intrinsic named constant `int16` from `iso_fortran_env`.
40+
41+
42+
### `int32`
43+
44+
Reexported intrinsic named constant `int32` from `iso_fortran_env`.
45+
46+
47+
### `int64`
48+
49+
Reexported intrinsic named constant `int64` from `iso_fortran_env`.
50+
51+
52+
### `lk`
53+
54+
Kind parameter of the default logical data type.
55+
56+
57+
### `c_bool`
58+
59+
Reexported intrinsic named constant `c_bool` from `iso_c_binding`.

doc/specs/stdlib_sorting.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ increasing, or decreasing, value.
211211

212212
##### Syntax
213213

214-
`call [[stdlib_sorting(module):ord_sort(subroutine)]]ord_sort ( array[, work, reverse ] )`
214+
`call [[stdlib_sorting(module):ord_sort(interface)]]( array[, work, reverse ] )`
215215

216216
##### Class
217217

@@ -286,7 +286,7 @@ decreasing, value.
286286

287287
##### Syntax
288288

289-
`call [[stdlib_sorting(module):sort(subroutine)]]sort ( array[, reverse] )`
289+
`call [[stdlib_sorting(module):sort(interface)]]( array[, reverse] )`
290290

291291
##### Class
292292

@@ -349,7 +349,7 @@ sort the input `array` to produce the output `array`.
349349

350350
##### Syntax
351351

352-
`call [[stdlib_sorting(module):sort_index(subroutine)]]sort_index ( array, index[, work, iwork, reverse ] )`
352+
`call [[stdlib_sorting(module):sort_index(interface)]]( array, index[, work, iwork, reverse ] )`
353353

354354
##### Class
355355

doc/specs/stdlib_string_type.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1254,7 +1254,7 @@ The result is a scalar `string_type` value.
12541254

12551255
```fortran
12561256
program demo_to_title
1257-
use stdlib_string_type, only: string_type, to_title
1257+
use stdlib_string_type
12581258
implicit none
12591259
type(string_type) :: string, titlecase_string
12601260
@@ -1302,7 +1302,7 @@ The result is a scalar `string_type` value.
13021302

13031303
```fortran
13041304
program demo_to_sentence
1305-
use stdlib_string_type, only: string_type, to_sentence
1305+
use stdlib_string_type
13061306
implicit none
13071307
type(string_type) :: string, sentencecase_string
13081308

0 commit comments

Comments
 (0)