diff options
author | Evan Wilde <etceterawilde@gmail.com> | 2023-11-06 00:36:28 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-11-17 13:43:21 (GMT) |
commit | c1d787e4734ca107e8ae084b3832e441651a6266 (patch) | |
tree | 9622a28a3c0e14caa452ac4ddb6733fa83564088 /Source/cmPolicies.h | |
parent | c39384f54019adce87d676a7ed6d8e772ce5b7f8 (diff) | |
download | CMake-c1d787e4734ca107e8ae084b3832e441651a6266.zip CMake-c1d787e4734ca107e8ae084b3832e441651a6266.tar.gz CMake-c1d787e4734ca107e8ae084b3832e441651a6266.tar.bz2 |
Swift: Add abstraction for compilation mode
Add a `CMAKE_Swift_COMPILATION_MODE` variable and corresponding
`Swift_COMPILATION_MODE` target property to control the compilation
mode. Select among `wholemodule`, `singlefile`, and `incremental`.
Add policy CMP0157 to remove the default `-wmo` flags in favor of the
abstract setting.
Issue: #25366
Diffstat (limited to 'Source/cmPolicies.h')
-rw-r--r-- | Source/cmPolicies.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h index 8aace68..7964f32 100644 --- a/Source/cmPolicies.h +++ b/Source/cmPolicies.h @@ -477,7 +477,10 @@ class cmMakefile; SELECT( \ POLICY, CMP0156, \ "De-duplicate libraries on link lines based on linker capabilities.", 3, \ - 29, 0, cmPolicies::WARN) + 29, 0, cmPolicies::WARN) \ + SELECT(POLICY, CMP0157, \ + "Swift compilation mode selected by an abstraction.", 3, 29, 0, \ + cmPolicies::WARN) #define CM_SELECT_ID(F, A1, A2, A3, A4, A5, A6) F(A1) #define CM_FOR_EACH_POLICY_ID(POLICY) \ @@ -518,7 +521,8 @@ class cmMakefile; F(CMP0142) \ F(CMP0154) \ F(CMP0155) \ - F(CMP0156) + F(CMP0156) \ + F(CMP0157) #define CM_FOR_EACH_CUSTOM_COMMAND_POLICY(F) \ F(CMP0116) \ |