X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;f=source%2Funres%2FCMakeLists.txt;h=e5aad58f9b38891a408da3e58feb59c03b8794f5;hb=799361a49f56aa9f841f318229c0dacf4fa7ac3c;hp=7c7359c1f99393fcbf6381b23b6ebf883e0aa34f;hpb=513f5fb9e31afc4a12d8ae2d113f7677ef057892;p=unres4.git diff --git a/source/unres/CMakeLists.txt b/source/unres/CMakeLists.txt index 7c7359c..e5aad58 100644 --- a/source/unres/CMakeLists.txt +++ b/source/unres/CMakeLists.txt @@ -29,10 +29,10 @@ set(UNRES_MD_SRC0 io_base.f90 energy.f90 check_bond.f90 - control.f90 + control.F90 MPI.f90 regularize.f90 - compare.f90 + compare.F90 map.f90 muca_md.f90 MCM_MD.f90 @@ -44,6 +44,13 @@ set(UNRES_MD_SRC0 REMD.f90 ) +if(UNRES_NEWGRAD) + set(UNRES_MD_SRC0 ${UNRES_MD_SRC0} + fdisy.f90 fdiag.f90 machpd.f90 + quindibisectok.F90 + quindet2ok.F90) +endif() + set(UNRES_MD_SRC1 data/minim_data.f90 ) @@ -64,7 +71,8 @@ set(UNRES_MD_SRC3 if (Fortran_COMPILER_NAME STREQUAL "ifort") set (CMAKE_Fortran_FLAGS_RELEASE " ") set (CMAKE_Fortran_FLAGS_DEBUG "-O0 -g ") - set(FFLAGS0 "-fpp -c -O3 -ip " ) +# set(FFLAGS0 "-fpp -c -O3 -ip " ) + set(FFLAGS0 "-CB -g -ip -fpp -heap-arrays" ) set(FFLAGS1 "-fpp -c -O " ) set(FFLAGS2 "-fpp -c -g -CA -CB ") set(FFLAGS3 "-fpp -c -g -O0 " ) @@ -110,6 +118,11 @@ elseif(UNRES_MD_FF STREQUAL "4P") set(CPPFLAGS "UNRES -DISNAN -DSPLITELE -DLANG0 -DCRYST_BOND -DCRYST_THETA -DCRYST_SC -DSCCORPDB" ) endif(UNRES_MD_FF STREQUAL "GAB") +if(UNRES_NEWGRAD) + set(CPPFLAGS "${CPPFLAGS} -DCARGRAD -DFIVEDIAG ") +endif() + + #========================================= # System specific flags #========================================= @@ -156,10 +169,18 @@ endif (architektura STREQUAL "64") #======================================== if(UNRES_WITH_MPI) # binary with mpi - set(UNRES_BIN "unresMD_${Fortran_COMPILER_NAME}_MPI_${UNRES_MD_FF}.exe") + if(UNRES_NEWGRAD) + set(UNRES_BIN "unresMD_${Fortran_COMPILER_NAME}_MPI_${UNRES_MD_FF}_NEWGRAD.exe") + else() + set(UNRES_BIN "unresMD_${Fortran_COMPILER_NAME}_MPI_${UNRES_MD_FF}.exe") + endif() else(UNRES_WITH_MPI) # binary without mpi - set(UNRES_BIN "unresMD_${Fortran_COMPILER_NAME}_single_${UNRES_MD_FF}.exe") + if(UNRES_NEWGRAD) + set(UNRES_BIN "unresMD_${Fortran_COMPILER_NAME}_single_${UNRES_MD_FF}_NEWGRAD.exe") + else() + set(UNRES_BIN "unresMD_${Fortran_COMPILER_NAME}_single_${UNRES_MD_FF}.exe") + endif() endif(UNRES_WITH_MPI) #========================================= @@ -203,9 +224,9 @@ set_property(SOURCE ${UNRES_MD_SRCS} PROPERTY COMPILE_DEFINITIONS ${CPPFLAGS} ) #========================================= # Build the binary #========================================= -add_executable(UNRES_BIN-MD ${UNRES_MD_SRCS} ) -set_target_properties(UNRES_BIN-MD PROPERTIES OUTPUT_NAME ${UNRES_BIN}) -set_property(TARGET UNRES_BIN-MD PROPERTY RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin ) +add_executable(UNRES_BIN ${UNRES_MD_SRCS} ) +set_target_properties(UNRES_BIN PROPERTIES OUTPUT_NAME ${UNRES_BIN}) +set_property(TARGET UNRES_BIN PROPERTY RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin ) #========================================= @@ -214,16 +235,16 @@ set_property(TARGET UNRES_BIN-MD PROPERTY RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINAR # link MPI library (libmpich.a) if(UNRES_WITH_MPI) - target_link_libraries( UNRES_BIN-MD ${MPI_Fortran_LIBRARIES} ) + target_link_libraries( UNRES_BIN ${MPI_Fortran_LIBRARIES} ) endif(UNRES_WITH_MPI) # link libxdrf.a #message("UNRES_XDRFLIB=${UNRES_XDRFLIB}") -target_link_libraries( UNRES_BIN-MD xdrf ) +target_link_libraries( UNRES_BIN xdrf ) #========================================= # Install Path #========================================= -install(TARGETS UNRES_BIN-MD DESTINATION ${CMAKE_INSTALL_PREFIX}) +install(TARGETS UNRES_BIN DESTINATION ${CMAKE_INSTALL_PREFIX}) #========================================= # TESTS