Skip to content

Commit bf8717d

Browse files
committed
skip contiguous check
1 parent 177545b commit bf8717d

3 files changed

Lines changed: 6 additions & 10 deletions

File tree

cmake/compilers.cmake

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,6 @@ endif()
103103
endblock()
104104

105105

106-
check_source_compiles(Fortran "program test
107-
real :: a(1)
108-
if (.not. is_contiguous(a)) error stop
109-
end program"
110-
f08contiguous)
111-
112106

113107
block()
114108

test/bool/CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@ integer, parameter :: lk = selected_logical_kind(1)
55
end program"
66
f23logical_kind)
77

8+
set(logical_bytes 8)
9+
math(EXPR logical_bits "${logical_bytes}*8")
10+
811
if(f23logical_kind)
9-
file(GENERATE OUTPUT logical_kind.inc CONTENT "integer, parameter :: lk = selected_logical_kind(64)")
12+
file(GENERATE OUTPUT logical_kind.inc CONTENT "integer, parameter :: lk = selected_logical_kind(${logical_bits})")
1013
else()
11-
file(GENERATE OUTPUT logical_kind.inc CONTENT "integer, parameter :: lk = 8")
14+
file(GENERATE OUTPUT logical_kind.inc CONTENT "integer, parameter :: lk = ${logical_bytes}")
1215
endif()
1316

1417
add_library(bool_fortran OBJECT ${PROJECT_SOURCE_DIR}/src/bool/logbool.f90)

test/contiguous/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
set_property(DIRECTORY PROPERTY LABELS contiguous)
22

3-
if(NOT f08contiguous)
4-
message(STATUS "Fortran compiler ${CMAKE_Fortran_COMPILER_ID} does not support is_contiguous")
3+
if(DEFINED f08contiguous AND NOT f08contiguous)
54
return()
65
endif()
76

0 commit comments

Comments
 (0)