Skip to content

Commit 386b4b4

Browse files
authored
Merge pull request #5967 from akyrtzi/cmake-opt-swift-install-exclude
[CMake] Check if a cmake variable 'SWIFT_INSTALL_EXCLUDE_[component]' is set for a component
2 parents fe586fa + 446db97 commit 386b4b4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

cmake/modules/SwiftComponents.cmake

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,12 @@ macro(swift_configure_components)
8585

8686
string(TOUPPER "${component}" var_name_piece)
8787
string(REPLACE "-" "_" var_name_piece "${var_name_piece}")
88-
set(SWIFT_INSTALL_${var_name_piece} TRUE)
88+
if("${SWIFT_INSTALL_EXCLUDE_${var_name_piece}}" STREQUAL "")
89+
set(SWIFT_INSTALL_EXCLUDE_${var_name_piece} FALSE)
90+
endif()
91+
if(NOT ${SWIFT_INSTALL_EXCLUDE_${var_name_piece}})
92+
set(SWIFT_INSTALL_${var_name_piece} TRUE)
93+
endif()
8994
endforeach()
9095
endmacro()
9196

0 commit comments

Comments
 (0)