Skip to content

Commit 7e318e2

Browse files
committed
[Build] Use FATAL_ERROR, not ERROR.
We should be using `FATAL_ERROR` for error messages from CMake, not just `ERROR`.
1 parent c749e64 commit 7e318e2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Runtimes/Core/cmake/modules/PlatformInfo.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,26 +50,26 @@ if(NOT SwiftCore_SWIFT_AVAILABILITY_PLATFORM)
5050
elseif(SwiftCore_MODULE_TRIPLE MATCHES ".*-([^-]+)$")
5151
set(platform "${CMAKE_MATCH_1}")
5252
else()
53-
message(ERROR "Unable to extract platform name from triple ${SwiftCore_MODULE_TRIPLE}")
53+
message(FATAL_ERROR "Unable to extract platform name from triple ${SwiftCore_MODULE_TRIPLE}")
5454
endif()
5555

5656
if(availability_platform_${platform})
5757
set(SwiftCore_SWIFT_AVAILABILITY_PLATFORM "${availability_platform_${platform}}")
5858
else()
59-
message(ERROR "Unknown platform ${platform} for availability")
59+
message(FATAL_ERROR "Unknown platform ${platform} for availability")
6060
endif()
6161
endif()
6262

6363
if(SwiftCore_VARIANT_MODULE_TRIPLE)
6464
if(SwiftCore_VARIANT_MODULE_TRIPLE MATCHES ".*-([^-]+)$")
6565
set(platform "${CMAKE_MATCH_1}")
6666
else()
67-
message(ERROR "Unable to extract platform name from triple ${SwiftCore_VARIANT_MODULE_TRIPLE}")
67+
message(FATAL_ERROR "Unable to extract platform name from triple ${SwiftCore_VARIANT_MODULE_TRIPLE}")
6868
endif()
6969

7070
if(availability_platform_${platform})
7171
set(SwiftCore_VARIANT_AVAILABILITY_PLATFORM "${availability_platform_${platform}}")
7272
else()
73-
message(ERROR "Unknown platform ${platform} for variant availability")
73+
message(FATAL_ERROR "Unknown platform ${platform} for variant availability")
7474
endif()
7575
endif()

0 commit comments

Comments
 (0)