VectorCamp / vectorscan

A portable fork of the high-performance regular expression matching library
https://www.vectorcamp.gr/project/vectorscan/
Other
478 stars 50 forks source link

XCode Generator in CMake Not Working #249

Open ErikTheBerik opened 2 months ago

ErikTheBerik commented 2 months ago

I am trying to build my CMake project, which uses vectorscan, with XCode generator to run some memory usage tests. When running the XCode generator in CMake I get the following error:

CMake Error in ***/_deps/vectorscan-src/CMakeLists.txt:
  The custom command generating

    ***/_deps/vectorscan-build/src/parser/Parser.cpp

  is attached to multiple targets:

    ragel_Parser
    hs_compile

  but none of these is a common dependency of the other(s).  This is not
  allowed by the Xcode "new build system".

Note that I cannot use -T buildsystem=1 because XCode 15 doesn't allow it any longer (and in order to run XCode in my mac, I need the latest XCode version...

Is there any fix to this?

markos commented 2 months ago

Hi @ErikTheBerik we do not currently use or support XCode, so we're not familiar with it, however I found that others have had that problem with new buildsystem. https://github.com/apple/swift/issues/60033 and https://github.com/neovim/neovim/pull/27680#issuecomment-1974850189

If it's a simple fix we will gladly accept a patch to enable Xcode builds, however it's not in our current plans to support Xcode generators from cmake. Try using plain Unix Makefiles or Ninja instead. I will leave this open as wishlist.

ErikTheBerik commented 2 months ago

Thanks for the reply @markos

I use Ninja as my default generator and that works without any problems, but I needed to use XCode to run some tests using their internal tools. I am also not too familiar with how Xcode does things, and honestly it seems like more of an apple problem since all other generators work fine. In any case, if you could support Xcode generator at some point that would be great, so thank you for adding the wishlist label.