+#======================================
+# Fortran compilers stuff
+#======================================
+# Get the compiler name
+get_filename_component (Fortran_COMPILER_NAME ${CMAKE_Fortran_COMPILER} NAME)
+
+# Altough cmake enables you to set some compiler definitions it seems by default they are ignored.
+# This is a workaround to pass compiler definitions (preprocesor flags) to fortran compilers like ifort
+SET(CMAKE_Fortran_COMPILE_OBJECT "<CMAKE_Fortran_COMPILER> ${CMAKE_START_TEMP_FILE} <FLAGS> <DEFINES> -c <SOURCE> -o <OBJECT> ${CMAKE_END_TEMP_FILE}")
+#set(CPPFLAGS "-DPROCOR -DLINUX -DPGI -DUNRES -DISNAN -DMP -DMPI -DSPLITELE -DLANGO -DCRYST_BOND -DCRYST_THETA -DCRYST_SC" )
+#add_definitions( ${CPPFLAGS} )
+
+
+# make sure that the default is a RELEASE
+if (NOT CMAKE_BUILD_TYPE)
+ set (CMAKE_BUILD_TYPE RELEASE CACHE STRING "Choose the type of build, options are: None Debug Release." FORCE)
+endif (NOT CMAKE_BUILD_TYPE)
+
+#=======================================
+# Set the varous build variables
+#=======================================
+
+# Set force field
+if (NOT UNRES_FF)
+ set(UNRES_FF "GAB" "E0LL2Y" CACHE STRING "Choose the force field, options are: GAB E0LL2Y" )
+ #message ( "Please set the Force field (UNRES_FF) to : GAB, 0ELE" )
+endif (NOT UNRES_FF)
+
+# Use of MPI library (default ON)
+option(UNRES_WITH_MPI "Choose whether or not to use MPI library" ON )
+
+#=================================