cmake: unbreak the usecase of cross-compiling the compiler while

disabling the standard library

In almost all cases, CMake will happily operate on undefined variables,
treating them as empty, but for some reason list(REMOVE_ITEM) is an
exception.

Swift SVN r25835
This commit is contained in:
Dmitri Hrybenko
2015-03-07 04:18:53 +00:00
parent ad12801a80
commit 71424c49bb

View File

@@ -1195,7 +1195,8 @@ function(add_swift_library name)
list(APPEND SWIFTLIB_SWIFT_MODULE_DEPENDS Core)
endif()
if(NOT "${SWIFT_BUILD_STDLIB}")
if((NOT "${SWIFT_BUILD_STDLIB}") AND
(NOT "${SWIFTLIB_SWIFT_MODULE_DEPENDS}" STREQUAL ""))
list(REMOVE_ITEM SWIFTLIB_SWIFT_MODULE_DEPENDS
Core SwiftUnstable)
endif()