Google Tests

This commit is contained in:
cdemeyer-teachx
2025-08-14 10:19:03 +09:00
parent e2cb19b92f
commit 1c1e7f8d51
19 changed files with 500 additions and 2 deletions

26
examples/CMakeLists.txt Normal file
View File

@@ -0,0 +1,26 @@
# Examples CMakeLists.txt
# Collect all example source files
file(GLOB_RECURSE EXAMPLE_SOURCES "*.cpp" "*.cc" "*.cxx")
# Create example executables
foreach(EXAMPLE_SOURCE ${EXAMPLE_SOURCES})
get_filename_component(EXAMPLE_NAME ${EXAMPLE_SOURCE} NAME_WE)
add_executable(${EXAMPLE_NAME} ${EXAMPLE_SOURCE})
# Link with our library
target_link_libraries(${EXAMPLE_NAME}
PRIVATE
PokemonSim::pokemon_battle_sim
)
# Include directories
target_include_directories(${EXAMPLE_NAME}
PRIVATE
${CMAKE_SOURCE_DIR}/include
)
endforeach()
# Example of adding examples manually:
# add_executable(battle_example battle_example.cpp)
# target_link_libraries(battle_example PRIVATE PokemonSim::pokemon_battle_sim)