include_directories("${MolCore_SOURCE_DIR}/src"
  "${MolCore_BINARY_DIR}/src")

# find google test
find_package(GTest REQUIRED)
include_directories(${GTEST_INCLUDE_DIRS})

add_executable(graphtest graphtest.cpp)
target_link_libraries(graphtest MolCore ${GTEST_BOTH_LIBRARIES})
add_test(GraphTest graphtest)

add_executable(moleculetest moleculetest.cpp)
target_link_libraries(moleculetest MolCore ${GTEST_BOTH_LIBRARIES})
add_test(MoleculeTest moleculetest)

add_executable(ringperceivertest ringperceivertest.cpp)
target_link_libraries(ringperceivertest MolCore ${GTEST_BOTH_LIBRARIES})
add_test(RingPerceiverTest ringperceivertest)

add_executable(varianttest varianttest.cpp)
target_link_libraries(varianttest MolCore ${GTEST_BOTH_LIBRARIES})
add_test(VariantTest varianttest)

add_executable(variantmaptest variantmaptest.cpp)
target_link_libraries(variantmaptest MolCore ${GTEST_BOTH_LIBRARIES})
add_test(VariantMapTest variantmaptest)

include_directories("${MolCore_SOURCE_DIR}/src"
  "${MolCore_BINARY_DIR}/src")

# find google test
find_package(GTest REQUIRED)
include_directories(${GTEST_INCLUDE_DIRS})

add_executable(graphtest graphtest.cpp)
target_link_libraries(graphtest MolCore ${GTEST_BOTH_LIBRARIES})
add_test(NAME GraphTest COMMAND graphtest)

add_executable(moleculetest moleculetest.cpp)
target_link_libraries(moleculetest MolCore ${GTEST_BOTH_LIBRARIES})
add_test(NAME MoleculeTest COMMAND moleculetest)

add_executable(ringperceivertest ringperceivertest.cpp)
target_link_libraries(ringperceivertest MolCore ${GTEST_BOTH_LIBRARIES})
add_test(NAME RingPerceiverTest COMMAND ringperceivertest)

add_executable(varianttest varianttest.cpp)
target_link_libraries(varianttest MolCore ${GTEST_BOTH_LIBRARIES})
add_test(NAME VariantTest COMMAND varianttest)

add_executable(variantmaptest variantmaptest.cpp)
target_link_libraries(variantmaptest MolCore ${GTEST_BOTH_LIBRARIES})
add_test(NAME VariantMapTest COMMAND variantmaptest)

Use the new form of add_test - exe locations.
Use the new form of add_test - exe locations.

Use the new form of add_test as that automatically resolves the location
of the executable created for the named target. Still has issues on
Windows as all DLLs must be in the same directory or the PATH.

Change-Id: I6ca59ad1d87a2371144f9d0c060ed268408fb308
