On Sun, Dec 30, 2018 at 13:09:23 -0800, Saleem Abdulrasool wrote: > I was looking at supporting Swift as a language in CMake. I know that > CMake has some preliminary support that assumes that you are building on > macOS with Xcode. I am trying to support building swift libraries and > executables on Linux and Windows.
IIRC, the issue before was that the command line interface to swiftc was basically treated as a black box and not stable (i.e., whatever Xcode wanted drove the interface, backwards compat was not guaranteed). Is that different now? > There is some preliminary work on this that I have put up on GitHub [1]. > One place that I am hitting a roadblock in is the need to reference all the > target sources in the compile rule for a single object. AFAICT, there is > no placeholder that will expand to the target sources. Would it be > acceptable to add a `<TARGET_SOURCES>` place holder? Or is there another > approach that would be better? The problem with that is that per-source file properties cannot be applied (compile definitions, flags, etc.). I don't know whether or not this is important for Swift. Other questions which spring to mind: - Does it support making just the compile artifacts from the source files or does it always do the link step? - If the latter, how do mixed language libraries work? - Also, if linking is done by Swift, how would one add a manifest or .rc file on Windows (e.g., to get an application icon)? The list of restrictions would need to be well-defined here first I think. --Ben -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake-developers