apple / swift-numerics

Advanced mathematical types and functions for Swift

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issues with CMake support

dabrahams opened this issue · comments

I have a suspicion that this bug may be triggered by the CMakeLists doing things they probably shouldn't, e.g. globally setting variables like CMAKE_Swift_MODULE_DIRECTORY even when it is not top-level and then using that to set INTERFACE_INCLUDE_DIRECTORIES properties. Obviously, the CMake Xcode generator “should” be resilient to any arbitrary setup you choose, but it's probably impossible for its author to avoid making some assumptions of regularity. I know what patch to offer for those top level variables, but then the INTERFACE_INCLUDE_DIRECTORIES settings stop having their intended effect.

I'd like to know what cmake + Ninja commands are expected to work on this project so that I can propose changes that preserve that functionality.

/cc @compnerd who wrote most of the CMake support.

I'm not sure what exactly you mean by "what cmake + Ninja commands are expected to work", could you elaborate on that? This project has been built standalone and as part of the swift project build for S4TF using the existing CMake support.

OK, first: I have confirmed that the reason the Xcode build isn't working is that the Xcode generator doesn't work with add_subdirectory. So it has nothing to do with this project's CMake support.

I'm not sure what exactly you mean by "what cmake + Ninja commands are expected to work", could you elaborate on that?

I mean, if I want to submit a PR to change the CMake support, what commands should I use to verify that I haven't broken anything that people currently expect to work? If I was changing Swift code, the answer would be swift test or something. I'm looking for an analog to that for changing CMake code.

This project has been built standalone and as part of the swift project build for S4TF using the existing CMake support.

I'm sure it has, but doubtless with the Xcode generator.

See previous comment, which has been updated.