diff --git a/1_single_executable/CMakeLists.txt b/1_single_executable/CMakeLists.txt index 05d4d5d..08d9393 100644 --- a/1_single_executable/CMakeLists.txt +++ b/1_single_executable/CMakeLists.txt @@ -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) diff --git a/1_single_executable/hello.swift b/1_single_executable/main.swift similarity index 93% rename from 1_single_executable/hello.swift rename to 1_single_executable/main.swift index 921f562..ea5c6f2 100644 --- a/1_single_executable/hello.swift +++ b/1_single_executable/main.swift @@ -9,4 +9,5 @@ // //===----------------------------------------------------------------------===// -print("Hello, world!") + +print("Hello, \(world())!") diff --git a/1_single_executable/world.swift b/1_single_executable/world.swift new file mode 100644 index 0000000..57641f4 --- /dev/null +++ b/1_single_executable/world.swift @@ -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" +} +