@@ -459,28 +459,15 @@ if(CMAKE_C_COMPILER_ID MATCHES Clang)
459
459
add_compile_options ($< $< OR:$< COMPILE_LANGUAGE:C> ,$< COMPILE_LANGUAGE:CXX> > :-Werror=gnu> )
460
460
endif ()
461
461
462
- if (CMAKE_SYSTEM_NAME STREQUAL Darwin OR
463
- EXISTS "${SWIFT_PATH_TO_LIBDISPATCH_SOURCE} " )
464
- set (SWIFT_BUILD_SYNTAXPARSERLIB_default TRUE )
465
- set (SWIFT_BUILD_SOURCEKIT_default TRUE )
466
- else ()
467
- set (SWIFT_BUILD_SYNTAXPARSERLIB_default FALSE )
468
- set (SWIFT_BUILD_SOURCEKIT_default FALSE )
469
- endif ()
470
- option (SWIFT_BUILD_SYNTAXPARSERLIB
471
- "Build the Swift Syntax Parser library"
472
- ${SWIFT_BUILD_SYNTAXPARSERLIB_default} )
473
- option (SWIFT_BUILD_ONLY_SYNTAXPARSERLIB
474
- "Only build the Swift Syntax Parser library" FALSE )
475
- option (SWIFT_BUILD_SOURCEKIT
476
- "Build SourceKit"
477
- ${SWIFT_BUILD_SOURCEKIT_default} )
478
- option (SWIFT_ENABLE_SOURCEKIT_TESTS
479
- "Enable running SourceKit tests"
480
- ${SWIFT_BUILD_SOURCEKIT_default} )
481
-
482
- if (NOT "${CMAKE_SYSTEM_NAME} " STREQUAL "Darwin" AND
483
- (SWIFT_BUILD_SYNTAXPARSERLIB OR SWIFT_BUILD_SOURCEKIT ))
462
+ option (SWIFT_BUILD_SYNTAXPARSERLIB "Build the Swift Syntax Parser library" TRUE )
463
+ option (SWIFT_BUILD_ONLY_SYNTAXPARSERLIB "Only build the Swift Syntax Parser library" FALSE )
464
+ option (SWIFT_BUILD_SOURCEKIT "Build SourceKit" TRUE )
465
+ option (SWIFT_ENABLE_SOURCEKIT_TESTS "Enable running SourceKit tests" TRUE )
466
+
467
+ if (NOT CMAKE_SYSTEM_NAME STREQUAL Darwin )
468
+ if (NOT EXISTS "${SWIFT_PATH_TO_LIBDISPATCH_SOURCE} " )
469
+ message (SEND_ERROR "SyntaxParserLib and SourceKit require libdispatch on non-Darwin hosts. Please specify SWIFT_PATH_TO_LIBDISPATCH_SOURCE" )
470
+ endif ()
484
471
set (SWIFT_NEED_EXPLICIT_LIBDISPATCH TRUE )
485
472
else ()
486
473
set (SWIFT_NEED_EXPLICIT_LIBDISPATCH FALSE )
0 commit comments