mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-29 02:20:17 -06:00
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
13 lines
296 B
CMake
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)
|