# # Testing # ENABLE_TESTING() INCLUDE_DIRECTORIES(${OPENMM_DIR}/platforms/reference/include) INCLUDE_DIRECTORIES(${OPENMM_DIR}/openmmapi/include/openmm) INCLUDE_DIRECTORIES(${OPENMM_DIR}/platforms/reference/src) SET(SHARED_OPENMM_DRUDE_TARGET OpenMMDrude) #LINK_DIRECTORIES # Automatically create tests using files named "Test*.cpp" FILE(GLOB TEST_PROGS "*Test*.cpp") FOREACH(TEST_PROG ${TEST_PROGS}) GET_FILENAME_COMPONENT(TEST_ROOT ${TEST_PROG} NAME_WE) # Link with shared library ADD_EXECUTABLE(${TEST_ROOT} ${TEST_PROG}) TARGET_LINK_LIBRARIES(${TEST_ROOT} ${SHARED_TARGET} ${SHARED_OPENMM_TARGET} ${SHARED_OPENMM_DRUDE_TARGET}) SET_TARGET_PROPERTIES(${TEST_ROOT} PROPERTIES LINK_FLAGS "${EXTRA_LINK_FLAGS}" COMPILE_FLAGS "${EXTRA_COMPILE_FLAGS}") ADD_TEST(${TEST_ROOT} ${EXECUTABLE_OUTPUT_PATH}/${TEST_ROOT}) ENDFOREACH(TEST_PROG ${TEST_PROGS})