Open kloczek opened 1 year ago
Thanks, I wasn't aware of that cmake feature! This looks a lot better than the current hack.
One problem I am running into is that this cmake module doesn't find the yacc versions shipped in base by most BSD systems.
What about bison? 🤔
bison would require installing an external package which I find unfortunate because iked builds fine with what is available in the base installation. Maybe we need a FindYACC and fallback to bison if that isn't there.
Currently most of the bison generated parses do not need flex static library on linking.
I'm not sure how it is with yacc on *BSD but generally speaking yacc on Linux is way behind GNU bison and everything what theoretically needs yacc always is possible to build bison.
https://github.com/openiked/openiked-portable/blob/81092ec416e0eeb27569b368e8e0d3d5e26c3b05/iked/CMakeLists.txt#L142-L146
This should be implemented using https://cmake.org/cmake/help/latest/module/FindFLEX.html