Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with CMake support #284

Open
dabrahams opened this issue Apr 4, 2024 · 3 comments
Open

Issues with CMake support #284

dabrahams opened this issue Apr 4, 2024 · 3 comments

Comments

@dabrahams
Copy link

dabrahams commented Apr 4, 2024

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.

@compnerd
Copy link
Contributor

compnerd commented Apr 5, 2024

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.

@dabrahams
Copy link
Author

dabrahams commented Apr 5, 2024

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.

@dabrahams
Copy link
Author

See previous comment, which has been updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants