[cmake-developers] Adding Swift support to CMake for Linux/Makefiles

Brad King brad.king at kitware.com
Thu Feb 4 13:08:06 EST 2016


On 01/29/2016 03:16 PM, Eric Wing wrote:
> I need more guidance here. I'm not connecting the dots.
> My problem seems to be that the execute_process() in
> CMakeDetermineCompilerId.cmake is trying to invoke the command:
> 'swift CompilerId/main.swift'
[snip]
> Looking at the execute_process() that gets invoked (final one in the
> big if/elseif block of CMAKE_DETERMINE_COMPILER_ID_BUILD), the only
> way to get the flags I need are via CMAKE_${lang}_COMPILER_ID_FLAGS.

Some refactoring may be needed to allow language-specific behavior
to add flags that must be there for the check.  Add an explicit
internal variable or other code path to support it (that is just
not set for other languages).  The semantics of selecting flags
from the environment in CMAKE_${lang}_COMPILER_ID_FLAGS must not
change.

Thanks,
-Brad



More information about the cmake-developers mailing list