Files
CMake/Tests/RunCMake/Swift/SwiftLibraryModuleCommand.cmake
Evan Wilde f292e28b84 Swift: Ninja: Pass module name to all swift builds
Executables that don't export a public API should not emit a
swiftmodule, but the swift modulename is observable from within the
program, so we should still set the module name on executable builds.

Fixes: #25710
2024-02-23 11:12:05 -05:00

13 lines
296 B
CMake

if(POLICY CMP0157)
cmake_policy(SET CMP0157 NEW)
endif()
enable_language(Swift)
add_library(StaticLibrary STATIC L.swift)
add_library(DynamicLibrary SHARED L.swift)
add_executable(Executable E.swift)
add_dependencies(DynamicLibrary StaticLibrary)
add_dependencies(Executable DynamicLibrary)