Commit Graph

11 Commits

Author SHA1 Message Date
Doug Coleman
8c2bd5ae23 cmake: Initial standalone overlays builds.
./utils/build-overlay AVFoundation OSX macosx
rdar://problem/28707246
2017-03-14 12:51:42 -07:00
Hugh Bellamy
a733b51bcb [CMake] improve precondition error message when negative precondition fails 2017-02-17 11:58:09 +07:00
Hugh Bellamy
95f93d463d [CMake] update precondition error message 2017-02-17 11:41:29 +07:00
Hugh Bellamy
888afe139c Fix creating symlinks on Windows 2016-12-27 14:55:05 +00:00
Michael Gottesman
7e2568dcf0 [cmake-components] Introduce a new API add_swift_host_tool for creating/initializing swift tool targets.
The main action here is to sink the creation of the installation rule for all of
the swift host tools into this API. In a latter commit, I will use this API to
create include and build rules for add_swift_host_tool.
2016-08-28 14:12:14 -07:00
Michael Gottesman
a6524d436b [cmake][utils] Add a new utility function precondition_binary_op.
This is a flexible way to assert that a binary operation succeeds. For
instance to precondition equality:

  precondition(EQUAL FOO BAR)

or string equality:

  precondition(STREQUALS FOO BAR)

Since cmake is so loosely typed, it is really important that we
precondition as much as possible to ensure sane behavior.
2016-07-25 12:03:25 -07:00
Michael Gottesman
27f2a8018e [cmake] Add an optional message parameter to precondition to allow for more specific precondition messages. 2016-07-25 12:03:25 -07:00
Michael Gottesman
aed9a81d00 [cmake][utils] Add a NEGATE flag to precondition.
Now one can do:

  precondition(VAR NEGATE)

to avoid typing:

  if (VAR)
    message(FATAL_ERROR ...)
  endif()

Normal precondition functionality is preserved.
2016-07-25 11:59:38 -07:00
Michael Gottesman
d417b48c77 [cmake] Move SwiftBuildType.cmake into SwiftUtils.cmake. NFC.
The contents of that .cmake file are cmake utility functions. Move them into
SwiftUtils.cmake, a file that contains cmake utility functions. This is just a
quick cleanup.
2016-07-21 13:55:42 -07:00
Michael Gottesman
c92f51a479 [cmake] Merge SwiftTranslateFlag.cmake into SwiftUtils.cmake
Both files are relatively small and contain utilities used by the build system.
So it makes sense to merge them.
2016-07-12 21:47:33 -07:00
Michael Gottesman
e12fff76fd [cmake] Add a SwiftUtils.cmake file to contain little helper routines such as precondition. 2016-06-22 19:57:49 -07:00