implement alphabet for sequence
[mussa.git] / alg / test / CMakeLists.txt
1 FIND_PACKAGE(OpenGL)
2 INCLUDE(FindBoost)
3 INCLUDE(Platform)
4
5 SET(SOURCES 
6       test_alphabet.cpp 
7       test_annotation_color.cpp 
8       test_color.cpp 
9       test_conserved_path.cpp
10       test_flp.cpp 
11       test_glseqbrowser.cpp 
12       test_glsequence.cpp
13       test_main.cpp
14       test_mussa.cpp 
15       test_nway.cpp 
16       test_sequence.cpp 
17       test_sequence_location.cpp )
18
19 GET_MUSSA_COMPILE_FLAGS(ALG_TEST_CFLAGS)
20 GET_MUSSA_LINK_FLAGS(ALG_TEST_LDFLAGS)
21 # dont you love the number of \ you need to make sure the " shows up in
22 # the C compiler?
23 SET(EXAMPLE_DIR ${CMAKE_SOURCE_DIR}/examples)
24 IF(WIN32)
25   STRING(REGEX REPLACE "/" "\\\\\\\\\\\\\\\\" EXAMPLE_DIR ${EXAMPLE_DIR})
26 ENDIF(WIN32)
27
28 SET_SOURCE_FILES_PROPERTIES(
29   ${SOURCES} 
30   COMPILE_FLAGS "-DEXAMPLE_DIR=\\\"${EXAMPLE_DIR}\\\" ${ALG_TEST_CFLAGS}"
31 )
32
33 ADD_EXECUTABLE(unittest ${SOURCES})
34 ADD_TEST(core_test ${CMAKE_BINARY_DIR}/alg/test/unittest)
35 LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/alg})
36 TARGET_LINK_LIBRARIES(unittest 
37                         mussa_core 
38                         ${BOOST_FILESYSTEM_LIBRARY}
39                         ${BOOST_UNIT_TEST_LIBRARY} 
40                         ${BOOST_SERIALIZATION_LIBRARY}
41                         ${OPENGL_gl_LIBRARY})
42
43 SET_TARGET_PROPERTIES(
44   unittest PROPERTIES
45     COMPILE_FLAGS "${ALG_TEST_CFLAGS}"
46     LINK_FLAGS "${ALG_TEST_LDFLAGS}"
47 )
48