cmake changes for pgf90
[unres.git] / source / unres / src_MD / CMakeLists.txt
index 499cfcb..a3d755f 100644 (file)
@@ -197,7 +197,11 @@ elseif (Fortran_COMPILER_NAME STREQUAL "f95")
   set(CPPFLAGS "${CPPFLAGS} -DG77") 
 elseif (Fortran_COMPILER_NAME STREQUAL "gfortran")
   # Add old gfortran flags
-  set(CPPFLAGS "${CPPFLAGS} -DG77") 
+  set(CPPFLAGS "${CPPFLAGS} -DG77")
+elseif (Fortran_COMPILER_NAME STREQUAL "pgf90")
+  set(CPPFLAGS "${CPPFLAGS} -DPGI")
+  FILE(COPY ${CMAKE_SOURCE_DIR}/source/lib/isnan_pgi.f DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
+  list(APPEND UNRES_MD_SRC0 ${CMAKE_CURRENT_BINARY_DIR}/isnan_pgi.f)
 endif (Fortran_COMPILER_NAME STREQUAL "ifort")
 
 #=========================================