message(STATUS "Tests: ENABLED")
include (Dart)
- enable_testing()
+ enable_testing()
+
+ if(SIMGEAR_SHARED)
+ set( TEST_LIBS
+ SimGearCore)
+ else()
+ set( TEST_LIBS
+ SimGearCore
+ ${CMAKE_THREAD_LIBS_INIT}
+ ${ZLIB_LIBRARY}
+ ${WINSOCK_LIBRARY}
+ ${RT_LIBRARY})
+ endif()
+
+ if(NOT SIMGEAR_HEADLESS)
+ set( TEST_LIBS
+ SimGearScene
+ ${TEST_LIBS})
+ endif()
else()
message(STATUS "Tests: DISABLED")
endif(ENABLE_TESTS)
# This could be handy for archiving the generated documentation or
# if some version control system is used.
-PROJECT_NUMBER = 2.2.0
+PROJECT_NUMBER = 2.11.0
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put.
# If the EXTRACT_STATIC tag is set to YES all static members of a file
# will be included in the documentation.
-EXTRACT_STATIC = NO
+EXTRACT_STATIC = YES
# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
# undocumented members of documented classes, files or namespaces.
if(ENABLE_TESTS)
-if (SIMGEAR_SHARED)
- set(TEST_LIBS SimGearCore)
-else()
- set(TEST_LIBS SimGearCore
- ${CMAKE_THREAD_LIBS_INIT}
- ${WINSOCK_LIBRARY}
- ${ZLIB_LIBRARY}
- ${RT_LIBRARY})
-endif()
-
add_executable(test_sock socktest.cxx)
target_link_libraries(test_sock ${TEST_LIBS})
target_link_libraries(test_binobj ${TEST_LIBS})
add_test(binobj ${EXECUTABLE_OUTPUT_PATH}/test_binobj)
+
endif(ENABLE_TESTS)
if(ENABLE_TESTS)
-if (SIMGEAR_SHARED)
- set(TEST_LIBS SimGearCore)
-else()
- set(TEST_LIBS SimGearCore ${CMAKE_THREAD_LIBS_INIT})
-endif()
-
add_executable(math_test SGMathTest.cxx)
target_link_libraries(math_test ${TEST_LIBS})
add_test(math ${EXECUTABLE_OUTPUT_PATH}/math_test)
add_executable(geometry_test SGGeometryTest.cxx)
target_link_libraries(geometry_test ${TEST_LIBS})
add_test(geometry ${EXECUTABLE_OUTPUT_PATH}/geometry_test)
+
endif(ENABLE_TESTS)
if(ENABLE_TESTS)
-if (SIMGEAR_SHARED)
- set(TEST_LIBS SimGearCore)
-else()
- set(TEST_LIBS SimGearCore
- ${CMAKE_THREAD_LIBS_INIT}
- ${ZLIB_LIBRARY})
-endif()
-
add_executable(test_tabbed_values tabbed_values_test.cxx)
add_test(tabbed_values ${EXECUTABLE_OUTPUT_PATH}/test_tabbed_values)
target_link_libraries(test_tabbed_values ${TEST_LIBS})
add_executable(test_path path_test.cxx )
add_test(test_path ${EXECUTABLE_OUTPUT_PATH}/test_path)
target_link_libraries(test_path ${TEST_LIBS})
+
endif(ENABLE_TESTS)
simgear_component(nasal/cppbind/detail nasal/cppbind/detail "" "${DETAIL_HEADERS}")
if(ENABLE_TESTS)
-
-if (SIMGEAR_SHARED)
- set(TEST_LIBS SimGearCore)
-else()
- set(TEST_LIBS SimGearCore ${CMAKE_THREAD_LIBS_INIT})
-endif()
-
add_executable(test_cppbind cppbind_test.cxx)
add_test(test_cppbind ${EXECUTABLE_OUTPUT_PATH}/test_cppbind)
target_link_libraries(test_cppbind ${TEST_LIBS})
if(ENABLE_TESTS)
-if (SIMGEAR_SHARED)
- set(TEST_LIBS SimGearCore)
-else()
- set(TEST_LIBS SimGearCore ${CMAKE_THREAD_LIBS_INIT})
-endif()
-
add_executable(test_props props_test.cxx)
target_link_libraries(test_props ${TEST_LIBS})
add_test(test_props ${EXECUTABLE_OUTPUT_PATH}/test_props)
using std::endl;
-\f
+
////////////////////////////////////////////////////////////////////////
// Sample object.
////////////////////////////////////////////////////////////////////////
};
-\f
+
////////////////////////////////////////////////////////////////////////
// Sample function.
////////////////////////////////////////////////////////////////////////
static double getNum (int index) { return 1.0 / index; }
-\f
+
////////////////////////////////////////////////////////////////////////
// Show a value.
////////////////////////////////////////////////////////////////////////
}
-\f
+
////////////////////////////////////////////////////////////////////////
// Test individual values.
////////////////////////////////////////////////////////////////////////
}
-\f
+
////////////////////////////////////////////////////////////////////////
// Check property nodes.
////////////////////////////////////////////////////////////////////////
simgear_scene_component(tgdb scene/tgdb "${SOURCES}" "${HEADERS}")
if(ENABLE_TESTS)
- if (SIMGEAR_SHARED)
- set(TEST_LIBS SimGearCore)
- else()
- set(TEST_LIBS SimGearCore ${CMAKE_THREAD_LIBS_INIT})
- endif()
add_executable(BucketBoxTest BucketBoxTest.cxx)
target_link_libraries(BucketBoxTest ${TEST_LIBS})
simgear_scene_component(util scene/util "${SOURCES}" "${HEADERS}")
if(ENABLE_TESTS)
+
add_executable(test_parse_color parse_color_test.cxx )
add_test(test_parse_color ${EXECUTABLE_OUTPUT_PATH}/test_parse_color)
-target_link_libraries(test_parse_color SimGearScene)
+target_link_libraries(test_parse_color ${TEST_LIBS})
+
endif(ENABLE_TESTS)
if(ENABLE_TESTS AND ENABLE_SOUND)
if (SIMGEAR_SHARED)
- set(SOUND_TEST_LIBS SimGearScene)
+ set( SOUND_TEST_LIBS
+ ${TEST_LIBS})
else()
set(SOUND_TEST_LIBS
- SimGearScene SimGearCore
- ${CMAKE_THREAD_LIBS_INIT}
- ${RT_LIBRARY}
- ${OPENAL_LIBRARY}
- ${ZLIB_LIBRARY})
+ ${TEST_LIBS}
+ ${OPENAL_LIBRARY})
endif()
function(create_test TEST_NAME)
simgear_component(structure structure "${SOURCES}" "${HEADERS}")
if(ENABLE_TESTS)
-
-if (SIMGEAR_SHARED)
- set(TEST_LIBS SimGearCore)
-else()
- set(TEST_LIBS SimGearCore ${CMAKE_THREAD_LIBS_INIT}
- ${ZLIB_LIBRARY}
- ${RT_LIBRARY})
-endif()
-
+
add_executable(test_state_machine state_machine_test.cxx)
target_link_libraries(test_state_machine ${TEST_LIBS})
add_test(test_state_machine ${EXECUTABLE_OUTPUT_PATH}/test_state_machine)
target_link_libraries(test_expressions ${TEST_LIBS})
add_test(test_expressions ${EXECUTABLE_OUTPUT_PATH}/test_expressions)
-
endif(ENABLE_TESTS)