Skip to content

Commit 48329ce

Browse files
committed
increased compliance
1 parent a657b59 commit 48329ce

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ endif()
1212
if(${CMAKE_Fortran_COMPILER_ID} STREQUAL GNU)
1313
if(${CMAKE_Fortran_COMPILER_VERSION} VERSION_GREATER_EQUAL 8.1)
1414
list(APPEND FFLAGS -std=f2018)
15-
else()
16-
list(APPEND FFLAGS -std=f2008ts)
1715
endif()
1816

1917
list(APPEND FFLAGS -mtune=native -Wall -Wextra -Wpedantic -Werror=array-bounds -fbacktrace -fexceptions)
@@ -30,7 +28,7 @@ endif()
3028

3129
set(DEMO_COARRAYS FALSE)
3230
if(${CMAKE_Fortran_COMPILER_ID} STREQUAL Intel)
33-
add_compile_options(-coarray=shared)
31+
list(APPEND FFLAGS -coarray=shared)
3432
link_libraries(-coarray=shared)
3533
set(DEMO_COARRAYS TRUE)
3634
elseif(${CMAKE_Fortran_COMPILER_ID} STREQUAL GNU)
@@ -46,13 +44,15 @@ elseif(${CMAKE_Fortran_COMPILER_ID} STREQUAL GNU)
4644
endif()
4745

4846
add_library(lineclip lineclipping.f90)
47+
target_compile_options(lineclip PRIVATE ${FFLAGS})
4948

5049
set(okcomp GNU Intel)
5150
if(CMAKE_Fortran_COMPILER_ID IN_LIST okcomp)
5251
add_library(assert assert.f90)
5352
else()
5453
add_library(assert assert_legacy.f90)
5554
endif()
55+
target_compile_options(assert PRIVATE ${FFLAGS})
5656

5757
add_executable(RunLineclip DemoLineclip.f90)
5858
target_compile_options(RunLineclip PRIVATE ${FFLAGS})

lineclipping.f90

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,9 @@ elemental subroutine cohensutherland(xmin,ymax,xmax,ymin, &
5555
integer k1, k2, opt ! just plain integers
5656
real(wp) :: x,y
5757

58-
nan = ieee_value(1.,ieee_quiet_nan)
59-
58+
nan = ieee_value(1.,ieee_quiet_nan)
59+
y = nan
60+
x = nan
6061

6162
! check for trivially outside lines
6263
k1 = getclip(x1,y1,xmin,xmax,ymin,ymax)

0 commit comments

Comments
 (0)