mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-07 18:43:26 -08:00
[Tests] Correct the note on the oracle test compression defines
add_definitions() populates the directory's COMPILE_DEFINITIONS property, which is consumed at generate time, so it reaches every target in the directory no matter where it is called relative to add_executable(). The previous note claimed the flags stayed confined to the benchmark because the find_package block came after it; oracle_importer_test, created above that block, carries both defines too. Verified harmless rather than a live bug: HAS_ZLIB and HAS_LZMA gate code only in oracle/src/pages.cpp and oracle/src/pagetemplates.cpp, and no test target compiles either. The ordering and the leaked defines are both pre-existing, so this only corrects the explanation.
This commit is contained in:
parent
fbfd85c8e7
commit
5ff88c1cf3
1 changed files with 3 additions and 2 deletions
|
|
@ -18,8 +18,9 @@ cockatrice_add_test(
|
||||||
# Oracle importer benchmark tests (manual, not run in CI, incl. RAM benchmark)
|
# Oracle importer benchmark tests (manual, not run in CI, incl. RAM benchmark)
|
||||||
# Optional compression libs, mirrored from oracle/CMakeLists.txt, so the benchmark
|
# Optional compression libs, mirrored from oracle/CMakeLists.txt, so the benchmark
|
||||||
# can download and decompress whatever AllPrintings format the default URL selects.
|
# can download and decompress whatever AllPrintings format the default URL selects.
|
||||||
# Declared after the unit tests above on purpose: add_definitions() only reaches
|
# add_definitions() is directory-scoped and order-independent, so HAS_ZLIB/HAS_LZMA also
|
||||||
# targets created after it, so HAS_ZLIB/HAS_LZMA stay confined to the benchmark.
|
# reach the two unit tests above. That is harmless: those macros gate code only in
|
||||||
|
# oracle/src/pages.cpp and oracle/src/pagetemplates.cpp, which no test target compiles.
|
||||||
find_package(ZLIB)
|
find_package(ZLIB)
|
||||||
if(ZLIB_FOUND)
|
if(ZLIB_FOUND)
|
||||||
add_definitions("-DHAS_ZLIB")
|
add_definitions("-DHAS_ZLIB")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue