Skip to content

Commit ca6b07e

Browse files
committed
Don't define CAF macro in CMake; add -coarray flag for ifort in serial mode
1 parent edf8533 commit ca6b07e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

CMakeLists.txt

+5-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ if(SERIAL)
3535
message(STATUS "Configuring build for serial execution")
3636
else()
3737
message(STATUS "Configuring build for parallel execution")
38-
add_definitions(-DCAF)
3938
endif()
4039

4140
# compiler flags for gfortran
@@ -60,6 +59,11 @@ endif()
6059
# compiler flags for ifort
6160
if(CMAKE_Fortran_COMPILER_ID MATCHES Intel)
6261

62+
if(SERIAL)
63+
message(STATUS "Configuring to build with -coarray=single")
64+
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -coarray=single")
65+
endif()
66+
6367
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fpp -assume byterecl,realloc_lhs -heap-arrays")
6468
set(CMAKE_Fortran_FLAGS_DEBUG "-O0 -g -C -traceback")
6569
set(CMAKE_Fortran_FLAGS_RELEASE "-O3")

0 commit comments

Comments
 (0)