X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;f=source%2Funres%2Fsrc_MD%2FCMakeLists.txt;h=052a7c95d9a520053f8ac4b722a903eae0049be6;hb=011f9a16683bb48096837601ff7136a747e01981;hp=f0f112372611e6db15f81c975752dc619f649514;hpb=3a3ee5013eef26f00c82b6948724fd9c54accc15;p=unres.git diff --git a/source/unres/src_MD/CMakeLists.txt b/source/unres/src_MD/CMakeLists.txt index f0f1123..052a7c9 100644 --- a/source/unres/src_MD/CMakeLists.txt +++ b/source/unres/src_MD/CMakeLists.txt @@ -145,6 +145,11 @@ elseif (Fortran_COMPILER_NAME STREQUAL "gfortran") set(FFLAGS2 "-std=legacy -I. ") #set(FFLAGS3 "-c -w -O3 -ipo -ipo_obj -opt_report" ) set(FFLAGS3 "-std=legacy -I. " ) +elseif (Fortran_COMPILER_NAME STREQUAL "g77") + set(FFLAGS0 "-I ${CMAKE_CURRENT_SOURCE_DIR} " ) + set(FFLAGS1 "-g -I ${CMAKE_CURRENT_SOURCE_DIR} " ) + set(FFLAGS2 "-I ${CMAKE_CURRENT_SOURCE_DIR} ") + set(FFLAGS3 "-I ${CMAKE_CURRENT_SOURCE_DIR} " ) endif (Fortran_COMPILER_NAME STREQUAL "ifort") @@ -166,14 +171,14 @@ set_property(SOURCE ${UNRES_MD_SRC3} PROPERTY COMPILE_FLAGS ${FFLAGS3} ) #========================================= if(UNRES_MD_FF STREQUAL "GAB" ) # set preprocesor flags - set(CPPFLAGS "PROCOR -DUNRES -DISNAN -DSPLITELE -DLANG0 -DCRYST_BOND -DCRYST_THETA -DCRYST_SC" ) + set(CPPFLAGS "PROCOR -DUNRES -DISNAN -DSPLITELE -DLANG0 -DCRYST_BOND -DCRYST_THETA -DCRYST_SC -DSCCORPDB" ) #========================================= # Settings for E0LL2Y force field #========================================= elseif(UNRES_MD_FF STREQUAL "E0LL2Y") # set preprocesor flags - set(CPPFLAGS "PROCOR -DUNRES -DISNAN -DSPLITELE -DLANG0" ) + set(CPPFLAGS "PROCOR -DUNRES -DISNAN -DSPLITELE -DLANG0 -DSCCORPDB" ) endif(UNRES_MD_FF STREQUAL "GAB") #========================================= @@ -196,6 +201,12 @@ elseif (Fortran_COMPILER_NAME STREQUAL "f95") elseif (Fortran_COMPILER_NAME STREQUAL "gfortran") # Add old gfortran flags set(CPPFLAGS "${CPPFLAGS} -DG77") +elseif (Fortran_COMPILER_NAME STREQUAL "g77") + # Add old gfortran flags + set(CPPFLAGS "${CPPFLAGS} -DG77") +else(Fortran_COMPILER_NAME STREQUAL "ifort") + # Default preprocessor flag + set(CPPFLAGS "${CPPFLAGS} -DPGI") endif (Fortran_COMPILER_NAME STREQUAL "ifort") #========================================= @@ -223,10 +234,10 @@ set_property(SOURCE ${UNRES_MD_PP_SRC} PROPERTY COMPILE_DEFINITIONS ${CPPFLAGS} #======================================== if(UNRES_WITH_MPI) # binary with mpi - set(UNRES_BIN "unres_${Fortran_COMPILER_NAME}_MPICH_${UNRES_MD_FF}.exe") + set(UNRES_BIN "unresMD_${Fortran_COMPILER_NAME}_MPICH_${UNRES_MD_FF}.exe") else(UNRES_WITH_MPI) # binary without mpi - set(UNRES_BIN "unres_${Fortran_COMPILER_NAME}_single_${UNRES_MD_FF}.exe") + set(UNRES_BIN "unresMD_${Fortran_COMPILER_NAME}_single_${UNRES_MD_FF}.exe") endif(UNRES_WITH_MPI) #========================================= @@ -272,7 +283,7 @@ set(UNRES_MD_SRCS ${UNRES_MD_SRC0} ${UNRES_MD_SRC3} ${CMAKE_CURRENT_BINARY_DIR}/ #========================================= add_executable(UNRES_BIN-MD ${UNRES_MD_SRCS} ) set_target_properties(UNRES_BIN-MD PROPERTIES OUTPUT_NAME ${UNRES_BIN}) -#set_property(TARGET ${UNRES_BIN} PROPERTY RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/unres/MD ) +set_property(TARGET UNRES_BIN-MD PROPERTY RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin ) #add_dependencies (${UNRES_BIN} ${UNRES_XDRFLIB}) @@ -288,6 +299,11 @@ endif(UNRES_WITH_MPI) target_link_libraries( UNRES_BIN-MD xdrf ) #========================================= +# Install Path +#========================================= +install(TARGETS UNRES_BIN-MD DESTINATION ${CMAKE_INSTALL_PREFIX}/unres/MD) + +#========================================= # TESTS #========================================= @@ -311,16 +327,23 @@ target_link_libraries( UNRES_BIN-MD xdrf ) #========================================= # test_single_ala.sh #========================================= +# +# Set parmaeters depending on force field +if(UNRES_MD_FF STREQUAL "GAB") + set(UNRES_BONDPAR "bond.parm") +elseif(UNRES_MD_FF STREQUAL "E0LL2Y") + set(UNRES_BONDPAR "bond_AM1.parm") +endif(UNRES_MD_FF STREQUAL "GAB") FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/scripts/test_single_ala.sh "#!/bin/sh export POT=GB export PREFIX=ala10 #----------------------------------------------------------------------------- -UNRES_BIN=./${UNRES_BIN} +UNRES_BIN=${CMAKE_BINARY_DIR}/bin/${UNRES_BIN} #----------------------------------------------------------------------------- DD=${CMAKE_SOURCE_DIR}/PARAM -export BONDPAR=$DD/bond.parm +export BONDPAR=$DD/${UNRES_BONDPAR} export THETPAR=$DD/thetaml.5parm export ROTPAR=$DD/scgauss.parm export TORPAR=$DD/torsion_631Gdp.parm