mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
GetSwiftModuleName() returns the target name verbatim when Swift_MODULE_NAME is not set, but hyphens are not valid in Swift module identifiers. Replace them with underscores so that targets like swift-syntax get module name swift_syntax automatically. Issue: #27748
10 lines
423 B
CMake
10 lines
423 B
CMake
# The module name should have underscores, not hyphens.
|
|
if(NOT actual_stdout MATCHES "-module-name L_hyphen")
|
|
string(APPEND RunCMake_TEST_FAILED
|
|
"Expected '-module-name L_hyphen', hyphens should be replaced with underscores.\n")
|
|
endif()
|
|
if(actual_stdout MATCHES "-module-name L-hyphen")
|
|
string(APPEND RunCMake_TEST_FAILED
|
|
"Found '-module-name L-hyphen', hyphens are not valid in Swift module names.\n")
|
|
endif()
|