Building Swift benchmark suite with CMake on Linux

The benchmark suite builds with CMake on OSX, but you have to use SwiftPM to build it on Linux.

It would be convenient if I could use CMake to build it on Linux, so that I don't have to build a whole toolchain with SwiftPM to run the benchmarks.

Is there any reason that I shouldn't add the ability to build the benchmarks with CMake on Linux?

(I have tried simply removing the condition that disables it on Linux. CMake complained CMake Error at benchmark/cmake/modules/SwiftBenchmarkUtils.cmake:25 (message): Error! Variable CLANG_EXEC is false, empty or not set.. I assume that I'll be able to fix this with more effort, but I decided I should ask whether this is a good idea before I spend the effort.)

@marcrasi We want to eventually eliminate the cmake build completely. It has always been a hack. I just haven't had the time to finish porting infrastructure/etc.

That being said, I would be fine with someone changing it to use compnerd's newer swift cmake stuff, but I would want other changes from who ever wanted to mess with that.

1 Like