From 9dcd74cfabdcb6bf481996a34b984457cda3151e Mon Sep 17 00:00:00 2001 From: Rintaro Ishizaki Date: Wed, 26 Jun 2024 09:10:17 -0700 Subject: [PATCH] [CMake] Add option to EXCLUDE_FROM_ALL SWIFTSYNTAX_EXCLUDE_FROM_ALL is a CMake option to enable EXCLUDE_FROM_ALL on the entire directory. --- CMakeLists.txt | 4 ++++ Sources/SwiftCompilerPlugin/CMakeLists.txt | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2474bc12e4e..654e8051134 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -82,5 +82,9 @@ add_compile_definitions( $<$:SWIFT_SYNTAX_BUILD_USING_CMAKE> ) +if(${SWIFTSYNTAX_EXCLUDE_FROM_ALL}) + set_directory_properties(PROPERTIES EXCLUDE_FROM_ALL YES) +endif() + add_subdirectory(Sources) add_subdirectory(cmake/modules) diff --git a/Sources/SwiftCompilerPlugin/CMakeLists.txt b/Sources/SwiftCompilerPlugin/CMakeLists.txt index 20c7d9a7872..83fb846a748 100644 --- a/Sources/SwiftCompilerPlugin/CMakeLists.txt +++ b/Sources/SwiftCompilerPlugin/CMakeLists.txt @@ -7,7 +7,6 @@ # See http://swift.org/CONTRIBUTORS.txt for Swift project authors add_swift_syntax_library(SwiftCompilerPlugin - EXCLUDE_FROM_ALL CompilerPlugin.swift )