Skip to content

Commit e59866c

Browse files
committed
updates golden file generation to work on clsuters and updates readme with instructions to pull the submodules for gtest
1 parent 5c8cfbc commit e59866c

3 files changed

Lines changed: 9 additions & 2 deletions

File tree

‎CMakeLists.txt‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,9 @@ if(BUILD_TESTING)
9797
# ── generate_golden_files target ─────────────────────────────────────────
9898
# Builds and runs the golden-file generator so that tests/golden/ contains
9999
# fresh reference files matching the current FZM format version.
100+
# EXCLUDE_FROM_ALL keeps cluster/head-node default builds GPU-free.
100101
# Usage: cmake --build <build-dir> --target generate_golden_files
101-
add_executable(generate_golden_files
102+
add_executable(generate_golden_files EXCLUDE_FROM_ALL
102103
tests/golden/regenerate.cpp
103104
)
104105
target_link_libraries(generate_golden_files PRIVATE fzgmod)
@@ -107,7 +108,7 @@ if(BUILD_TESTING)
107108
)
108109
# After the binary is built, immediately run it to write the reference files.
109110
add_custom_command(TARGET generate_golden_files POST_BUILD
110-
COMMAND generate_golden_files
111+
COMMAND $<TARGET_FILE:generate_golden_files>
111112
"${CMAKE_CURRENT_SOURCE_DIR}/tests/golden"
112113
COMMENT "Generating golden reference FZM files in tests/golden/"
113114
VERBATIM

‎README.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ See `examples/caller_allocated_output.cpp` for a minimal end-to-end example.
103103
## Building from Source
104104

105105
```bash
106+
git clone https://github.com/szcompressor/FZGPUModules.git
107+
git submodule update --init --recursive
106108
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
107109
cmake --build build -j
108110
```

‎tests/golden/README.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ cmake --preset release
3434
cmake --build --preset release --target generate_golden_files
3535
```
3636

37+
`generate_golden_files` is intentionally excluded from the default `all` build.
38+
This keeps head/login-node builds on clusters GPU-free while still allowing
39+
explicit regeneration on GPU-capable nodes or GPU CI jobs.
40+
3741
This runs `tests/golden/regenerate` which writes fresh reference files to this
3842
directory. Commit the new files alongside the version bump.
3943

0 commit comments

Comments
 (0)