Skip to content

Dealing with multiple swift files : hello.swift and world.swift#11

Open
afabri wants to merge 4 commits into
swiftlang:mainfrom
afabri:Two_swift_files
Open

Dealing with multiple swift files : hello.swift and world.swift#11
afabri wants to merge 4 commits into
swiftlang:mainfrom
afabri:Two_swift_files

Conversation

@afabri
Copy link
Copy Markdown

@afabri afabri commented Apr 24, 2024

When using more than one swift file to build the executable hello., one of them must be called main.swift.
It might make sense to. have that as a seprarate example, or just telling it in the readme.

@afabri
Copy link
Copy Markdown
Author

afabri commented Apr 24, 2024

Adding a swift file to 2_executable_library/lib/CMakeLists.txt. works without any change.

Comment thread 1_single_executable/CMakeLists.txt
Comment thread 1_single_executable/main.swift Outdated
Comment thread 1_single_executable/world.swift Outdated
Copy link
Copy Markdown

@lrineau lrineau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tested locally on Linux. Looks good to me, once the two typos are fixed (missing ! and extra trailing ).

I have reservations: I wonder if it would makes sense to have a extra sub-directory, like:

  1_single_executable/
  1_bis_single_executable_multiple_swift_files/

afabri and others added 2 commits May 3, 2024 13:47
Co-authored-by: Laurent Rineau <Laurent.Rineau@cgal.org>
Co-authored-by: Laurent Rineau <Laurent.Rineau@cgal.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants