From 0df70cb956d14e02ba4a606c307765327f9e7831 Mon Sep 17 00:00:00 2001 From: David A Minton Date: Tue, 21 Mar 2023 12:40:45 -0400 Subject: [PATCH] More updates to coarray CMAKE options --- src/CMakeLists.txt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b8cc5be2c..b63b7148a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -88,6 +88,9 @@ set(SWIFTEST_src ${FAST_MATH_FILES} ${STRICT_MATH_FILES}) # Define the executable in terms of the source files ADD_EXECUTABLE(${SWIFTEST_DRIVER} ${SWIFTEST_src}) +# Turn preprocessor on for all files +SET_SOURCE_FILES_PROPERTIES(${SWIFTEST_src} PROPERTIES Fortran_PREPROCESS ON) + ##################################################### # Add the needed libraries and special compiler flags ##################################################### @@ -101,11 +104,11 @@ IF(USE_OPENMP) LINK_FLAGS "${OpenMP_Fortran_FLAGS}") ENDIF(USE_OPENMP) -IF(USE_CAF) +IF(USE_COARRAY) SET_TARGET_PROPERTIES(${SWIFTEST_DRIVER} PROPERTIES COMPILE_FLAGS "${Coarray_Fortran_FLAGS}" LINK_FLAGS "${Coarray_Fortran_FLAGS}") -ENDIF(USE_CAF) +ENDIF(USE_COARRAY) ##################################### @@ -127,3 +130,7 @@ IF(BT STREQUAL "RELEASE" OR BT STREQUAL "PROFILE") SET_PROPERTY(SOURCE ${FAST_MATH_FILES} APPEND_STRING PROPERTY COMPILE_FLAGS "${FASTMATH_FLAGS}") ENDIF() +IF(BT STREQUAL "DEBUG") + ADD_DEFINITIONS(-DDEBUG) +ENDIF() +