# 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")
#=========================================
if(UNRES_FF STREQUAL "GAB" )
# set preprocesor flags
- set(CPPFLAGS "PROCOR -DLINUX -DUNRES -DISNAN -DSPLITELE -DLANGO -DCRYST_BOND -DCRYST_THETA -DCRYST_SC" )
+ set(CPPFLAGS "PROCOR -DLINUX -DUNRES -DISNAN -DSPLITELE -DLANG0 -DCRYST_BOND -DCRYST_THETA -DCRYST_SC" )
if (Fortran_COMPILER_NAME STREQUAL "ifort")
# Add ifort preprocessor flags
# - shame on me ]:)
#=========================================
set_property(SOURCE compinfo.c PROPERTY CMAKE_C_FLAGS "-c" )
-add_executable(compinfo compinfo.c)
+add_executable(compinfo-md compinfo.c)
+set_target_properties(compinfo-md PROPERTIES OUTPUT_NAME compinfo)
+
set(UNRES_CINFO_DIR "${CMAKE_CURRENT_BINARY_DIR}" )
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/cinfo.f
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/cinfo.f ${CMAKE_CURRENT_BINARY_DIR}/cinfo.f
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/COMMON.IOUNITS ${CMAKE_CURRENT_BINARY_DIR}/COMMON.IOUNITS
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/compinfo | true
- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/cinfo.f )
+ DEPENDS compinfo-md )
set_property(SOURCE ${UNRES_CINFO_DIR}/cinfo.f PROPERTY COMPILE_FLAGS ${FFLAGS0} )
#=========================================
#=========================================
# Build the binary
#=========================================
-add_executable(${UNRES_BIN} ${UNRES_MD_SRCS} )
+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 )
#add_dependencies (${UNRES_BIN} ${UNRES_XDRFLIB})
#=========================================
# link MPI library (libmpich.a)
if(UNRES_WITH_MPI)
- target_link_libraries( ${UNRES_BIN} ${MPIF_LIBRARIES} )
+ target_link_libraries( UNRES_BIN-MD ${MPIF_LIBRARIES} )
endif(UNRES_WITH_MPI)
# link libxdrf.a
#message("UNRES_XDRFLIB=${UNRES_XDRFLIB}")
-target_link_libraries( ${UNRES_BIN} xdrf )
+target_link_libraries( UNRES_BIN-MD xdrf )
#=========================================
# TESTS