added 32/64-bit architecture detection
[unres.git] / source / unres / src_MD-M / CMakeLists.txt
index 5576b81..c1f570f 100644 (file)
@@ -160,17 +160,17 @@ set(UNRES_MDM_PP_SRC
 # Set comipiler flags for different sourcefiles  
 #================================================
 if (Fortran_COMPILER_NAME STREQUAL "ifort")
-  set(FFLAGS0 "-c -ip -w" ) 
-  set(FFLAGS1 "-c -w -g -d2 -CA -CB" ) 
-  set(FFLAGS2 "-c -w -g -00 ")
+  set(FFLAGS0 "-ip -w" ) 
+  set(FFLAGS1 "-w -g -d2 -CA -CB" ) 
+  set(FFLAGS2 "-w -g -00 ")
   #set(FFLAGS3 "-c -w -O3 -ipo -ipo_obj -opt_report" )
-  set(FFLAGS3 "-c -w -ipo " )
+  set(FFLAGS3 "-w -ipo " )
 elseif (Fortran_COMPILER_NAME STREQUAL "gfortran")
-  set(FFLAGS0 "-c -I. " ) 
-  set(FFLAGS1 "-c -g -I. " ) 
-  set(FFLAGS2 "-c -I. ")
+  set(FFLAGS0 "-I. " ) 
+  set(FFLAGS1 "-g -I. " ) 
+  set(FFLAGS2 "-I. ")
   #set(FFLAGS3 "-c -w -O3 -ipo -ipo_obj -opt_report" )
-  set(FFLAGS3 "-c -I. " )
+  set(FFLAGS3 "-I. " )
 endif (Fortran_COMPILER_NAME STREQUAL "ifort")
 
 
@@ -224,6 +224,14 @@ if (UNRES_WITH_MPI)
   set(CPPFLAGS "${CPPFLAGS} -DMP -DMPI") 
 endif(UNRES_WITH_MPI)
 
+
+# add 64-bit specific preprocessor flags
+if (architektura STREQUAL "64")
+  set(CPPFLAGS "${CPPFLAGS} -DAMD64")
+endif (architektura STREQUAL "64")
+
+
+
 # Apply preprocesor flags to *.F files
 set_property(SOURCE ${UNRES_MDM_PP_SRC} PROPERTY COMPILE_DEFINITIONS ${CPPFLAGS} )