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() +