xdrf2x.F
)
-set(CPPFLAGS "PROCOR -DUNRES -DMP -DMPI -DSPLITELE -DNEWUNRES" )
+set(CPPFLAGS "PROCOR -DUNRES -DSPLITELE -DNEWUNRES" )
#=========================================
# System specific flags
#=========================================
-# Build the binaries
+# Build the binaries (used by "make")
#=========================================
add_executable(xdrf2pdb ${UNRES_XDRF_XDRF2PDB_SRC} )
target_link_libraries( xdrf2pdb xdrf )
target_link_libraries( xdrf2ang xdrf )
+#=========================================
+# INSTALL (used by "make install")
+#=========================================
+install(TARGETS xdrf2pdb RUNTIME DESTINATION unrespack/bin)
+install(TARGETS xdrf2pdb-m RUNTIME DESTINATION unrespack/bin)
+install(TARGETS xdrf2x RUNTIME DESTINATION unrespack/bin)
+install(TARGETS xdrf2ang RUNTIME DESTINATION unrespack/bin)
+
+#=========================================
+# TESTS (used by "ctest")
+#=========================================
+
+
+# Create files needed for tests
+
+file( COPY ${CMAKE_SOURCE_DIR}/ctest/ala10one.seq
+ DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
+
+file( COPY ${CMAKE_SOURCE_DIR}/ctest/ala10three.seq
+ DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
+
+file( COPY ${CMAKE_SOURCE_DIR}/ctest/1L2Yone.seq
+ DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
+
+file( COPY ${CMAKE_SOURCE_DIR}/ctest/1L2Ythree.seq
+ DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
+
+file( COPY ${CMAKE_SOURCE_DIR}/ctest/ala10MD.cx
+ DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
+
+file( COPY ${CMAKE_SOURCE_DIR}/ctest/1L2Y_MREMD_MD000.cx
+ DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
+
+
+# Test xdrf2pdb
+add_test(NAME XDRF2PDB-one COMMAND xdrf2pdb one ala10one.seq ala10MD.cx )
+add_test(NAME XDRF2PDB-three COMMAND xdrf2pdb three ala10three.seq ala10MD.cx )
+
+# Test xdrf2pdb-m
+add_test(NAME XDRF2PDB-M-one COMMAND xdrf2pdb-m one 1L2Yone.seq 1L2Y_MREMD_MD000.cx 32 30 )
+add_test(NAME XDRF2PDB-M-three COMMAND xdrf2pdb-m three 1L2Ythree.seq 1L2Y_MREMD_MD000.cx 32 30 )
+
+# Test xdrf2ang
+add_test(NAME XDRF2ANG-one COMMAND xdrf2ang one ala10one.seq ala10MD.cx )
+add_test(NAME XDRF2ANG-three COMMAND xdrf2ang three ala10three.seq ala10MD.cx )
+
+