# # CMake project file for UNRES # enable_language (Fortran) # Set sources set(UNRES_MD_SRC0 unres.F arcos.f cartprint.f chainbuild.F convert.f initialize_p.F matmult.f readrtns.F parmread.F gen_rand_conf.F printmat.f map.f pinorm.f randgens.f rescode.f intcor.f timing.F misc.f intlocal.f cartder.F checkder_p.F econstr_local.F minimize_p.F sumsld.f cored.f rmdd.f geomout.F readpdb.F regularize.F thread.F fitsq.f mcm.F mc.F bond_move.f refsys.f check_sc_distr.f check_bond.f contact.f djacob.f eigen.f blas.f add.f entmcm.F minim_mcmf.F MP.F compare_s1.F prng_32.F banach.f rmsd.F elecont.f dihed_cons.F sc_move.F local_move.f intcartderiv.F lagrangian_lesyng.F stochfric.F kinetic_lesyng.f MD_A-MTS.F moments.f int_to_cart.f surfatom.f sort.f muca_md.f MREMD.F rattle.F gauss.f energy_split-sep.F q_measure.F gnmr1.f test.F ) set(UNRES_MD_SRC3 energy_p_new_barrier.F energy_p_new-sep_barrier.F gradient_p.F ) # Set compiler flags for different sourcefiles set(FFLAGS0 -c -O3 -ip -w ) set(FFLAGS1 -c -w -g -d2 -CA -CB ) set(FFLAGS2 -c -w -g -00 ) set(FFLAGS3 -c -w -O3 -ipo -ipo_obj -opt_report ) set_property(SOURCE ${UNRES_MD_SRC0} PROPERTY CMAKE_Fortran_FLAGS ${FFLAGS0} ) set_property(SOURCE ${UNRES_MD_SRC1} PROPERTY COMPILE_FLAGS ${FFLAGS1} ) set_property(SOURCE ${UNRES_MD_SRC2} PROPERTY COMPILE_FLAGS ${FFLAGS2} ) set_property(SOURCE ${UNRES_MD_SRC3} PROPERTY CMAKE_Fortran_FLAGS ${FFLAGS3} ) # Compile code if(UNRES_FF STREQUAL "GAB") set(CPPFLAGS -DPROCOR -DLINUX -DPGI -DUNRES -DISNAN -DMP -DMPI -DSPLITELE -DLANGO -DCRYST_BOND -DCRYST_THETA -DCRYST_SC ) else(UNRES_FF strequal "E0LL2Y") set(CPPFLAGS -DPROCOR -DLINUX -DPGI -DUNRES -DISNAN -DMP -DMPI -DSPLITELE -DLANG0 ) endif() add_executable(unres ${UNRES_MD_SRC0} ${UNRES_MD_SRC3} )