@@ -71,6 +71,23 @@ macro(swift_configure_components)
71
71
# Set the SWIFT_INSTALL_COMPONENTS variable to the default value if it is not passed in via -D
72
72
set (SWIFT_INSTALL_COMPONENTS "${_SWIFT_DEFINED_COMPONENTS} " CACHE STRING
73
73
"A semicolon-separated list of components to install ${_SWIFT_DEFINED_COMPONENTS} " )
74
+
75
+ foreach (component ${_SWIFT_DEFINED_COMPONENTS} )
76
+ string (TOUPPER "${component} " var_name_piece )
77
+ string (REPLACE "-" "_" var_name_piece "${var_name_piece} " )
78
+ set (SWIFT_INSTALL_${var_name_piece} FALSE )
79
+ endforeach ()
80
+
81
+ foreach (component ${SWIFT_INSTALL_COMPONENTS} )
82
+ list (FIND _SWIFT_DEFINED_COMPONENTS "${component} " index )
83
+ if (${index} EQUAL -1 )
84
+ message (FATAL_ERROR "unknown install component: ${component} " )
85
+ endif ()
86
+
87
+ string (TOUPPER "${component} " var_name_piece )
88
+ string (REPLACE "-" "_" var_name_piece "${var_name_piece} " )
89
+ set (SWIFT_INSTALL_${var_name_piece} TRUE )
90
+ endforeach ()
74
91
endmacro ()
75
92
76
93
function (swift_is_installing_component component result_var_name )
@@ -105,22 +122,3 @@ function(swift_install_in_component component)
105
122
install (${ARGN} )
106
123
endif ()
107
124
endfunction ()
108
-
109
- macro (swift_configure_install_components install_components )
110
- foreach (component ${_SWIFT_DEFINED_COMPONENTS} )
111
- string (TOUPPER "${component} " var_name_piece )
112
- string (REPLACE "-" "_" var_name_piece "${var_name_piece} " )
113
- set (SWIFT_INSTALL_${var_name_piece} FALSE )
114
- endforeach ()
115
-
116
- foreach (component ${install_components} )
117
- list (FIND _SWIFT_DEFINED_COMPONENTS "${component} " index )
118
- if (${index} EQUAL -1 )
119
- message (FATAL_ERROR "unknown install component: ${component} " )
120
- endif ()
121
-
122
- string (TOUPPER "${component} " var_name_piece )
123
- string (REPLACE "-" "_" var_name_piece "${var_name_piece} " )
124
- set (SWIFT_INSTALL_${var_name_piece} TRUE )
125
- endforeach ()
126
- endmacro ()
0 commit comments