1
0
Fork 0
flightgear/tests/CMakeLists.txt

137 lines
4 KiB
Text
Raw Normal View History

set(sources
Main/options.cxx
Main/fg_commands.cxx
Main/fg_props.cxx
Main/globals.cxx
Main/locale.cxx
Main/util.cxx
Main/positioninit.cxx
Improved infrastructure for add-ons: C++ classes, metadata file, Nasal interface This commit adds C++ classes for add-on management, most notably AddonManager, Addon and AddonVersion. The AddonManager is used to register add-ons. It relies on an std::map<std::string, AddonRef> to hold the metadata of each registered add-on (keys of the std::map are add-on identifiers, and AddonRef is currently SGSharedPtr<Addon>). Accessor methods are available for: - retrieving the list of registered or loaded add-ons (terminology explained in $FG_ROOT/Docs/README.add-ons); - checking if a particular add-on has already been registered or loaded; - for each add-on, obtaining an Addon instance which can be queried for its name, id, version, base path, the minimum and maximum FlightGear versions it requires, its base node in the Property Tree, its order in the load sequence, short and long description strings, home page, etc. The most important metadata is made accessible in the Property Tree under /addons/by-id/<addon-id> and the property /addons/by-id/<addon-id>/loaded can be checked or listened to, in order to determine when a particular add-on is loaded. There is also a Nasal interface to access add-on metadata in a convenient way. In order to provide this metadata, each add-on must from now on have in its base directory a file called 'addon-metadata.xml'. All this is documented in much more detail in $FG_ROOT/Docs/README.add-ons. Mailing-list discussion: https://sourceforge.net/p/flightgear/mailman/message/36146017/
2017-11-06 12:58:14 +00:00
Add-ons/Addon.cxx
Add-ons/AddonManager.cxx
Add-ons/AddonMetadataParser.cxx
Add-ons/AddonResourceProvider.cxx
Improved infrastructure for add-ons: C++ classes, metadata file, Nasal interface This commit adds C++ classes for add-on management, most notably AddonManager, Addon and AddonVersion. The AddonManager is used to register add-ons. It relies on an std::map<std::string, AddonRef> to hold the metadata of each registered add-on (keys of the std::map are add-on identifiers, and AddonRef is currently SGSharedPtr<Addon>). Accessor methods are available for: - retrieving the list of registered or loaded add-ons (terminology explained in $FG_ROOT/Docs/README.add-ons); - checking if a particular add-on has already been registered or loaded; - for each add-on, obtaining an Addon instance which can be queried for its name, id, version, base path, the minimum and maximum FlightGear versions it requires, its base node in the Property Tree, its order in the load sequence, short and long description strings, home page, etc. The most important metadata is made accessible in the Property Tree under /addons/by-id/<addon-id> and the property /addons/by-id/<addon-id>/loaded can be checked or listened to, in order to determine when a particular add-on is loaded. There is also a Nasal interface to access add-on metadata in a convenient way. In order to provide this metadata, each add-on must from now on have in its base directory a file called 'addon-metadata.xml'. All this is documented in much more detail in $FG_ROOT/Docs/README.add-ons. Mailing-list discussion: https://sourceforge.net/p/flightgear/mailman/message/36146017/
2017-11-06 12:58:14 +00:00
Add-ons/AddonVersion.cxx
Add-ons/contacts.cxx
Add-ons/exceptions.cxx
Aircraft/controls.cxx
Aircraft/FlightHistory.cxx
Aircraft/flightrecorder.cxx
Aircraft/replay.cxx
Autopilot/route_mgr.cxx
Airports/airport.cxx
Airports/airport.hxx
Airports/apt_loader.cxx
Airports/airportdynamicsmanager.cxx
Airports/airportdynamicsmanager.hxx
Airports/dynamicloader.cxx
Airports/dynamics.cxx
Airports/xmlloader.cxx
Airports/runwaybase.cxx
Airports/pavement.cxx
Airports/parking.cxx
Airports/groundnetwork.cxx
Airports/gnnode.cxx
Airports/runways.cxx
Airports/runwayprefs.cxx
Airports/runwayprefloader.cxx
ATC/CommStation.cxx
# ATC/GroundController.cxx
# ATC/atc_mgr.cxx
Environment/atmosphere.cxx
Environment/environment.cxx
Environment/environment_mgr.cxx
Environment/environment_ctrl.cxx
Environment/presets.cxx
Environment/gravity.cxx
Environment/ridge_lift.cxx
Environment/magvarmanager.cxx
Navaids/airways.cxx
Navaids/fixlist.cxx
Navaids/markerbeacon.cxx
Navaids/NavDataCache.cxx
Navaids/navdb.cxx
Navaids/navlist.cxx
Navaids/navrecord.cxx
Navaids/poidb.cxx
Navaids/procedure.cxx
Navaids/positioned.cxx
Navaids/PositionedOctree.cxx
Navaids/routePath.cxx
Navaids/route.cxx
Navaids/waypoint.cxx
Navaids/FlightPlan.cxx
Navaids/LevelDXML.cxx
Network/HTTPClient.cxx
Time/TimeManager.cxx
Time/bodysolver.cxx
Scripting/NasalSys.cxx
Improved infrastructure for add-ons: C++ classes, metadata file, Nasal interface This commit adds C++ classes for add-on management, most notably AddonManager, Addon and AddonVersion. The AddonManager is used to register add-ons. It relies on an std::map<std::string, AddonRef> to hold the metadata of each registered add-on (keys of the std::map are add-on identifiers, and AddonRef is currently SGSharedPtr<Addon>). Accessor methods are available for: - retrieving the list of registered or loaded add-ons (terminology explained in $FG_ROOT/Docs/README.add-ons); - checking if a particular add-on has already been registered or loaded; - for each add-on, obtaining an Addon instance which can be queried for its name, id, version, base path, the minimum and maximum FlightGear versions it requires, its base node in the Property Tree, its order in the load sequence, short and long description strings, home page, etc. The most important metadata is made accessible in the Property Tree under /addons/by-id/<addon-id> and the property /addons/by-id/<addon-id>/loaded can be checked or listened to, in order to determine when a particular add-on is loaded. There is also a Nasal interface to access add-on metadata in a convenient way. In order to provide this metadata, each add-on must from now on have in its base directory a file called 'addon-metadata.xml'. All this is documented in much more detail in $FG_ROOT/Docs/README.add-ons. Mailing-list discussion: https://sourceforge.net/p/flightgear/mailman/message/36146017/
2017-11-06 12:58:14 +00:00
Scripting/NasalAddons.cxx
Scripting/NasalCondition.cxx
Scripting/NasalAircraft.cxx
Scripting/NasalString.cxx
Scripting/NasalPositioned.cxx
Scripting/NasalPositioned_cppbind.cxx
Scripting/nasal-props.cxx
Scripting/NasalSGPath.cxx
Scripting/NasalHTTP.cxx
Viewer/view.cxx
Viewer/viewmgr.cxx
)
foreach(s ${sources})
set_property(DIRECTORY APPEND PROPERTY fgtestlib_sources "${CMAKE_SOURCE_DIR}/src/${s}")
endforeach()
set_property(DIRECTORY APPEND PROPERTY fgtestlib_sources "${CMAKE_SOURCE_DIR}/3rdparty/cjson/cJSON.c")
get_property(fgtestlib_sources DIRECTORY PROPERTY fgtestlib_sources)
add_library(fgtestlib SHARED ${fgtestlib_sources}
"${CMAKE_SOURCE_DIR}/test_suite/helpers/globals.cxx"
"${CMAKE_SOURCE_DIR}/test_suite/dataStore.cxx"
testStubs.cxx
fake_sgSky.cxx
fake_sgPrecipitation.cxx
fake_sound.cxx)
set_target_properties (fgtestlib
PROPERTIES
COMPILE_DEFINITIONS "FG_TESTLIB"
)
if(FG_HAVE_GPERFTOOLS)
target_include_directories(fgtestlib PRIVATE ${GooglePerfTools_INCLUDE_DIR})
target_link_libraries(fgtestlib ${GooglePerfTools_LIBRARIES})
endif()
target_link_libraries(fgtestlib SimGearCore ${PLATFORM_LIBS} ${SQLITE3_LIBRARY})
add_executable(fgtest fgTestDriver.cxx)
target_link_libraries(fgtest fgtestlib)
macro(flightgear_test name sources)
add_executable(${name} ${sources})
target_include_directories(${name} PRIVATE ${CMAKE_SOURCE_DIR}/tests)
target_link_libraries(${name} fgtestlib)
add_test(${name} ${EXECUTABLE_OUTPUT_PATH}/${name})
endmacro()
flightgear_test(test_navs test_navaids2.cxx)
add_executable(testAeroElement testAeroElement.cxx ${CMAKE_SOURCE_DIR}/src/FDM/AIWake/AeroElement.cxx)
target_link_libraries(testAeroElement SimGearCore)
add_test(testAeroElement ${EXECUTABLE_OUTPUT_PATH}/testAeroElement)
add_executable(testAeroMesh testAeroMesh.cxx
${CMAKE_SOURCE_DIR}/src/FDM/AIWake/AeroElement.cxx
${CMAKE_SOURCE_DIR}/src/FDM/AIWake/AircraftMesh.cxx
${CMAKE_SOURCE_DIR}/src/FDM/AIWake/WakeMesh.cxx
${CMAKE_SOURCE_DIR}/src/FDM/AIWake/AIWakeGroup.cxx
${CMAKE_SOURCE_DIR}/src/FDM/LaRCsim/ls_matrix.c
)
set_target_properties (testAeroMesh PROPERTIES COMPILE_DEFINITIONS "FG_TESTLIB")
target_include_directories(testAeroMesh PRIVATE ${CMAKE_SOURCE_DIR}/tests
${CMAKE_SOURCE_DIR}/src/FDM/JSBSim)
target_link_libraries(testAeroMesh SimGearCore JSBSim)
add_test(testAeroMesh ${EXECUTABLE_OUTPUT_PATH}/testAeroMesh)