FIND_PACKAGE(OpenGL) INCLUDE(FindBoost) INCLUDE(Platform) SET(SOURCES test_alphabet.cpp test_annotation_color.cpp test_color.cpp test_conserved_path.cpp test_flp.cpp test_glseqbrowser.cpp test_glsequence.cpp test_main.cpp test_mussa.cpp test_nway.cpp test_sequence.cpp test_sequence_location.cpp ) GET_MUSSA_COMPILE_FLAGS(ALG_TEST_CFLAGS) GET_MUSSA_LINK_FLAGS(ALG_TEST_LDFLAGS) # dont you love the number of \ you need to make sure the " shows up in # the C compiler? SET(EXAMPLE_DIR ${CMAKE_SOURCE_DIR}/examples) IF(WIN32) STRING(REGEX REPLACE "/" "\\\\\\\\\\\\\\\\" EXAMPLE_DIR ${EXAMPLE_DIR}) ENDIF(WIN32) SET_SOURCE_FILES_PROPERTIES( ${SOURCES} COMPILE_FLAGS "-DEXAMPLE_DIR=\\\"${EXAMPLE_DIR}\\\" ${ALG_TEST_CFLAGS}" ) ADD_EXECUTABLE(unittest ${SOURCES}) ADD_TEST(core_test ${CMAKE_BINARY_DIR}/alg/test/unittest) LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/alg}) TARGET_LINK_LIBRARIES(unittest mussa_core ${BOOST_FILESYSTEM_LIBRARY} ${BOOST_UNIT_TEST_LIBRARY} ${BOOST_SERIALIZATION_LIBRARY} ${OPENGL_gl_LIBRARY}) SET_TARGET_PROPERTIES( unittest PROPERTIES COMPILE_FLAGS "${ALG_TEST_CFLAGS}" LINK_FLAGS "${ALG_TEST_LDFLAGS}" )