@@ -47,87 +47,12 @@ install(TARGETS bench_firo
4747 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
4848)
4949
50- # Spark/Lelantus benchmarking framework
51- option (BUILD_BENCH_SPARK "Build Spark/Lelantus benchmarks" OFF )
52-
5350if (BUILD_BENCH_SPARK)
54- message (STATUS "Building Spark benchmarks" )
55-
56- # Generic benchmarking framework library
57- add_library (firo_benchmark STATIC
58- ${CMAKE_CURRENT_SOURCE_DIR } /benchmark.cpp
59- )
60-
61- target_include_directories (firo_benchmark PUBLIC
62- ${CMAKE_CURRENT_SOURCE_DIR }
63- )
64-
65- # Optional: Enable Linux perf counters (requires explicit opt-in)
66- option (ENABLE_BENCH_PERF_COUNTERS "Enable Linux perf counters in benchmarks (Linux only)" OFF )
67-
68- if (ENABLE_BENCH_PERF_COUNTERS)
69- if (CMAKE_SYSTEM_NAME STREQUAL "Linux" )
70- target_compile_definitions (firo_benchmark PUBLIC BENCH_PERF_COUNTERS )
71- message (STATUS " Linux perf counters: ENABLED" )
72- else ()
73- message (WARNING " ENABLE_BENCH_PERF_COUNTERS is only supported on Linux, ignoring" )
74- endif ()
75- else ()
76- message (STATUS " Linux perf counters: DISABLED (use -DENABLE_BENCH_PERF_COUNTERS=ON to enable)" )
77- endif ()
78-
79- # Grootle proof benchmarks
80- add_executable (bench_spark_grootle
81- ${CMAKE_CURRENT_SOURCE_DIR } /spark_grootle.cpp
82- )
83-
84- target_link_libraries (bench_spark_grootle
85- firo_benchmark
86- firo_node
87- Boost::filesystem
88- secp256k1pp
89- )
90-
91- # BPPlus (Bulletproofs+) benchmarks
92- add_executable (bench_spark_bpplus
93- ${CMAKE_CURRENT_SOURCE_DIR } /spark_bpplus.cpp
94- )
95-
96- target_link_libraries (bench_spark_bpplus
97- firo_benchmark
98- firo_node
99- Boost::filesystem
100- secp256k1pp
101- )
102-
103- # Chaum proof benchmarks
104- add_executable (bench_spark_chaum
105- ${CMAKE_CURRENT_SOURCE_DIR } /spark_chaum.cpp
106- )
107-
108- target_link_libraries (bench_spark_chaum
109- firo_benchmark
110- firo_node
111- Boost::filesystem
112- secp256k1pp
113- )
114-
115- # Schnorr signature benchmarks
116- add_executable (bench_spark_schnorr
117- ${CMAKE_CURRENT_SOURCE_DIR } /spark_schnorr.cpp
118- )
119-
120- target_link_libraries (bench_spark_schnorr
121- firo_benchmark
122- firo_node
123- Boost::filesystem
124- secp256k1pp
125- )
126-
127- # Install benchmark executables
128- install (TARGETS bench_spark_grootle bench_spark_bpplus bench_spark_chaum bench_spark_schnorr
129- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
51+ target_sources (bench_firo
52+ PRIVATE
53+ ${CMAKE_CURRENT_SOURCE_DIR } /spark_bpplus.cpp
54+ ${CMAKE_CURRENT_SOURCE_DIR } /spark_chaum.cpp
55+ ${CMAKE_CURRENT_SOURCE_DIR } /spark_grootle.cpp
56+ ${CMAKE_CURRENT_SOURCE_DIR } /spark_schnorr.cpp
13057 )
131-
132- message (STATUS " Benchmarks: bench_spark_grootle, bench_spark_bpplus, bench_spark_chaum, bench_spark_schnorr" )
13358endif ()
0 commit comments