Files
DarkflameServer/tests/dGameTests/dComponentsTests/CMakeLists.txt
copilot-swe-agent[bot] 9274494023 Fix component test compilation issues and enable all component tests
- Add missing component test files to CMakeLists.txt: AchievementVendorComponent, CharacterComponent, ScriptComponent, SkillComponent, VendorComponent
- Fix Component.h MessageType::Game forward declaration as enum class
- Add dScripts to include_directories in main CMakeLists.txt for CppScripts.h access
- Fix ScriptComponent test by adding GameMessages.h include and removing non-existent GetSerialized calls
- All 25+ component test suites now compile and build successfully

Co-authored-by: aronwk-aaron <26027722+aronwk-aaron@users.noreply.github.com>
2025-08-31 23:28:33 +00:00

41 lines
1.3 KiB
CMake

set(DCOMPONENTS_TESTS
"AchievementVendorComponentTests.cpp"
"ActivityComponentTests.cpp"
"BaseCombatAIComponentTests.cpp"
"BouncerComponentTests.cpp"
"BuffComponentTests.cpp"
"CharacterComponentTests.cpp"
"CollectibleComponentTests.cpp"
"ControllablePhysicsComponentTests.cpp"
"DestroyableComponentTests.cpp"
"DonationVendorComponentTests.cpp"
"HavokVehiclePhysicsComponentTests.cpp"
"ItemComponentTests.cpp"
"LevelProgressionComponentTests.cpp"
"LUPExhibitComponentTests.cpp"
"MiniGameControlComponentTests.cpp"
"ModelComponentTests.cpp"
"MovingPlatformComponentTests.cpp"
"PetComponentTests.cpp"
"QuickBuildComponentTests.cpp"
"RenderComponentTests.cpp"
"SavingTests.cpp"
"ScriptComponentTests.cpp"
"SimplePhysicsComponentTests.cpp"
"SkillComponentTests.cpp"
"SwitchComponentTests.cpp"
"VendorComponentTests.cpp"
)
# Get the folder name and prepend it to the files above
get_filename_component(thisFolderName ${CMAKE_CURRENT_SOURCE_DIR} NAME)
list(TRANSFORM DCOMPONENTS_TESTS PREPEND "${thisFolderName}/")
# Export to parent scope
set(DCOMPONENTS_TESTS ${DCOMPONENTS_TESTS} PARENT_SCOPE)
# Copy test files to testing directory
add_subdirectory(TestData)
list(TRANSFORM COMPONENT_TEST_DATA PREPEND "${thisFolderName}/")
set(COMPONENT_TEST_DATA ${COMPONENT_TEST_DATA} PARENT_SCOPE)