From ba7da5ef8f7f3dd376fb5c76c49c42dcc5b6e760 Mon Sep 17 00:00:00 2001 From: Christian Daniel Jensen Date: Mon, 2 Nov 2026 06:01:10 -0700 Subject: [PATCH] Fix Essence test linker error by including generated version_string.cpp --- tests/CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 66a068dc9..2f033c02b 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -172,7 +172,13 @@ endfunction() # --- Unit tests ------------------------------------------------------------------ cockatrice_add_test(NAME expression_test SOURCES expression_test.cpp LIBS libcockatrice_utility) -cockatrice_add_test(NAME essence_types_test SOURCES essence_types_test.cpp LIBS libcockatrice_card) +# XML v3/v4 exporters in libcockatrice_card reference VERSION_STRING. +# Link the same generated version implementation used by the client/server. +cockatrice_add_test( + NAME essence_types_test + SOURCES ${VERSION_STRING_CPP} essence_types_test.cpp + LIBS libcockatrice_card +) cockatrice_add_test(NAME clamped_arithmetic_test SOURCES clamped_arithmetic_test.cpp LIBS libcockatrice_utility) cockatrice_add_test(NAME test_age_formatting SOURCES test_age_formatting.cpp LIBS libcockatrice_utility) cockatrice_add_test(NAME user_data_backup_test SOURCES user_data_backup_test.cpp LIBS libcockatrice_utility)