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

Commit d0f13b0

Browse files
authored
Merge pull request #459 from wyphan/patch-1
Fix CMake variable usage
2 parents 492543d + 6e9e91c commit d0f13b0

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

‎.github/workflows/CI.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
run: >-
6363
cmake -Wdev
6464
-DCMAKE_BUILD_TYPE=Release
65-
-DCMAKE_MAXIMUM_RANK=4
65+
-DCMAKE_MAXIMUM_RANK:String=4
6666
-DCMAKE_INSTALL_PREFIX=$PWD/_dist
6767
-S . -B build
6868
@@ -179,7 +179,7 @@ jobs:
179179
run: >-
180180
cmake -Wdev
181181
-DCMAKE_BUILD_TYPE=Release
182-
-DCMAKE_MAXIMUM_RANK=4
182+
-DCMAKE_MAXIMUM_RANK:String=4
183183
-DCMAKE_INSTALL_PREFIX=$PWD/_dist
184184
-S . -B build
185185

‎.github/workflows/ci_windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
-B build
6565
-DCMAKE_BUILD_TYPE=Debug
6666
-DCMAKE_Fortran_FLAGS_DEBUG="-Wall -Wextra -Wimplicit-interface -fPIC -g -fcheck=all -fbacktrace"
67-
-DCMAKE_MAXIMUM_RANK=4
67+
-DCMAKE_MAXIMUM_RANK:String=4
6868
-DCMAKE_INSTALL_PREFIX=$PWD/_dist
6969
env:
7070
FC: gfortran

‎CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ check_fortran_source_runs("i=0; error stop i; end" f18errorstop SRC_EXT f90)
4949
check_fortran_source_compiles("real, allocatable :: array(:, :, :, :, :, :, :, :, :, :); end" f03rank SRC_EXT f90)
5050
check_fortran_source_runs("use, intrinsic :: iso_fortran_env, only : real128; real(real128) :: x; x = x+1; end" f03real128)
5151

52-
option(CMAKE_MAXIMUM_RANK "Maximum array rank for generated procedures" 4)
52+
if(NOT DEFINED CMAKE_MAXIMUM_RANK)
53+
set(CMAKE_MAXIMUM_RANK 4 CACHE STRING "Maximum array rank for generated procedures")
54+
endif()
5355

5456
# --- find preprocessor
5557
find_program(FYPP fypp)

‎README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ Important options are
136136
For example, to configure a build using the Ninja backend and generating procedures up to rank 7, which is installed to your home directory use
137137

138138
```sh
139-
cmake -B build -G Ninja -DCMAKE_MAXIMUM_RANK=7 -DCMAKE_INSTALL_PREFIX=$HOME/.local
139+
cmake -B build -G Ninja -DCMAKE_MAXIMUM_RANK:String=7 -DCMAKE_INSTALL_PREFIX=$HOME/.local
140140
```
141141

142142
To build the standard library run

0 commit comments

Comments
(0)

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