Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 1_single_executable/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ cmake_minimum_required(VERSION 3.22)

project(hello LANGUAGES Swift)

add_executable(hello hello.swift)
add_executable(hello main.swift world.swift)
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@
//
//===----------------------------------------------------------------------===//

print("Hello, world!")

print("Hello, \(world())")
16 changes: 16 additions & 0 deletions 1_single_executable/world.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift open source project
//
// Copyright (c) 2023 Apple Inc. and the Swift project authors.
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
//
//===----------------------------------------------------------------------===//

func world() -> String
{
return "world"
}