aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2021-09-06 10:57:40 +0100
committerSimon Tatham <anakin@pobox.com>2021-09-06 10:57:40 +0100
commit6691ad180cdd6f80673c49392c401ba8d6c5d3e7 (patch)
tree2c89fdca036ba5f926a428e8df8c0d0a273492a6 /cmake
parentc108271b44c9607fce88499d794cbf1648213f1d (diff)
downloadpuzzles-6691ad180cdd6f80673c49392c401ba8d6c5d3e7.zip
puzzles-6691ad180cdd6f80673c49392c401ba8d6c5d3e7.tar.gz
puzzles-6691ad180cdd6f80673c49392c401ba8d6c5d3e7.tar.bz2
puzzles-6691ad180cdd6f80673c49392c401ba8d6c5d3e7.tar.xz
Fix benchmark.sh for the new cmake world.
It relied on reading gamedesc.txt to find a list of puzzle binaries to run. But gamedesc.txt is now specific to the Windows build (since it contains Windows executable names), and isn't available in the Unix cmake build directory. Fixed by making a simpler gamelist.txt available on all platforms.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/setup.cmake12
1 files changed, 12 insertions, 0 deletions
diff --git a/cmake/setup.cmake b/cmake/setup.cmake
index 26eb74d..ee39dbf 100644
--- a/cmake/setup.cmake
+++ b/cmake/setup.cmake
@@ -160,3 +160,15 @@ macro(export_variables_to_parent_scope)
set(objective_${name} ${objective_${name}} PARENT_SCOPE)
endforeach()
endmacro()
+
+macro(build_extras)
+ # Write out a list of the game names, for benchmark.sh to use.
+ file(WRITE ${CMAKE_BINARY_DIR}/gamelist.txt "")
+ list(SORT puzzle_names)
+ foreach(name ${puzzle_names})
+ file(APPEND ${CMAKE_BINARY_DIR}/gamelist.txt "${name}\n")
+ endforeach()
+
+ # Further extra stuff specific to particular platforms.
+ build_platform_extras()
+endmacro()