Changeset 3365 for d-collide

Show
Ignore:
Timestamp:
04/09/08 10:52:30 (2 years ago)
Author:
andi
Message:

make cppunit optional

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • d-collide/trunk/d-collide/tests/CMakeLists.txt

    r3089 r3365  
    55find_path(CPPUNIT_INCLUDE_DIR cppunit/TestFixture.h ENV INCLUDE) 
    66 
    7 # tell cmake where to find d-collide headers 
    8 include_directories(../src ${CPPUNIT_INCLUDE_DIR}) 
     7if (CPPUNIT_LIBRARY AND CPPUNIT_INCLUDE_DIR) 
    98 
    10 set(tests_SRCS 
    11     main.cpp 
    12     aabbtest.cpp 
    13     kdoptest.cpp 
    14     obbtest.cpp 
    15     boundingvolumetest.cpp 
    16     boundingvolumehierarchytest.cpp 
    17     narrowphasetest.cpp 
    18     normalstest.cpp 
    19     middlephaserigidtest.cpp 
    20     multimapelementtest.cpp 
    21     proxytest.cpp 
    22     deformable/deformablebvhnodetest.cpp 
    23     deformable/surfacehierarchytest.cpp 
    24     worldtest.cpp 
    25     broadphasecollisionstest.cpp 
    26     broadphasehierarchicalgridtest.cpp 
    27     broadphasebruteforcetest.cpp 
    28     listtest.cpp 
    29     arraytest.cpp 
    30     settest.cpp 
    31     boundingspheretest.cpp 
    32     undotest.cpp 
    33 ) 
     9    # tell cmake where to find d-collide headers 
     10    include_directories(../src ${CPPUNIT_INCLUDE_DIR}) 
    3411 
    35 add_executable(tests ${tests_SRCS}) 
    36 target_link_libraries(tests ${CPPUNIT_LIBRARY} ${CMAKE_DL_LIBS}) 
    37 target_link_libraries(tests modelloader dcollide-static) 
     12    set(tests_SRCS 
     13        main.cpp 
     14        aabbtest.cpp 
     15        kdoptest.cpp 
     16        obbtest.cpp 
     17        boundingvolumetest.cpp 
     18        boundingvolumehierarchytest.cpp 
     19        narrowphasetest.cpp 
     20        normalstest.cpp 
     21        middlephaserigidtest.cpp 
     22        multimapelementtest.cpp 
     23        proxytest.cpp 
     24        deformable/deformablebvhnodetest.cpp 
     25        deformable/surfacehierarchytest.cpp 
     26        worldtest.cpp 
     27        broadphasecollisionstest.cpp 
     28        broadphasehierarchicalgridtest.cpp 
     29        broadphasebruteforcetest.cpp 
     30        listtest.cpp 
     31        arraytest.cpp 
     32        settest.cpp 
     33        boundingspheretest.cpp 
     34        undotest.cpp 
     35    ) 
     36 
     37    add_executable(tests ${tests_SRCS}) 
     38    target_link_libraries(tests ${CPPUNIT_LIBRARY} ${CMAKE_DL_LIBS}) 
     39    target_link_libraries(tests modelloader dcollide-static) 
    3840 
    3941 
    40 # AB: note that d-collide uses buildbot internally, thus we do NOT use the CTest 
    41 #     framework (and consequently don't use "add_test()" here) 
    42 add_custom_target(test 
    43         COMMAND ${CMAKE_CURRENT_BINARY_DIR}/tests 
    44         DEPENDS tests 
    45 ) 
     42    # AB: note that d-collide uses buildbot internally, thus we do NOT use the CTest 
     43    #     framework (and consequently don't use "add_test()" here) 
     44    add_custom_target(test 
     45            COMMAND ${CMAKE_CURRENT_BINARY_DIR}/tests 
     46            DEPENDS tests 
     47    ) 
     48endif (CPPUNIT_LIBRARY AND CPPUNIT_INCLUDE_DIR) 
    4649 
    4750# vim: et sw=4 ts=4