[cmake-developers] Adding Swift support to CMake for Linux/Makefiles
Brad King
brad.king at kitware.com
Tue Jan 12 14:41:12 EST 2016
On 01/08/2016 06:15 PM, Eric Wing wrote:
> simple 'swiftc' integration going for ADD_EXECUTABLE, as described in
> the original post.
Take the generator check out of Modules/CMakeDetermineSwiftCompiler.cmake
to get rid of the up-front error. See "Modules/CMakeAddNewLanguage.txt"
(many of the steps are already done).
Edit Modules/CMakeSwiftInformation.cmake and add settings for variables
like CMAKE_Swift_COMPILE_OBJECT and CMAKE_Swift_LINK_EXECUTABLE. See
the CMake{C,CXX,Fortran}Information.cmake modules for examples. The
available placeholders are in cmLocalGenerator::ExpandRuleVariable.
If all the compile/link steps used for C and C++ map well to switfc
then it should be fairly straightforward. If other steps are needed
or the steps have wildly different semantics then more in-depth changes
to the actual generators may be needed.
-Brad
More information about the cmake-developers
mailing list