diff options
| author | Bernhard Guillon <Bernhard.Guillon@begu.org> | 2026-06-30 22:21:31 +0200 |
|---|---|---|
| committer | Bernhard Guillon <Bernhard.Guillon@begu.org> | 2026-06-30 22:21:31 +0200 |
| commit | 3b05b33ff30b49ab0a3c4500d9d11c700bdc1a02 (patch) | |
| tree | c60648fd5e6dcf8007e904839384e3de0a9c4020 | |
| parent | 4470bda7f8f49bc8675889ef03ee4ef01f5a33cc (diff) | |
| download | csharp-cmake-3b05b33ff30b49ab0a3c4500d9d11c700bdc1a02.tar.gz csharp-cmake-3b05b33ff30b49ab0a3c4500d9d11c700bdc1a02.zip | |
Add Third project: two-file executable with globbing for *.cs via CONFIGURE_DEPENDS
| -rw-r--r-- | CMakeLists.txt | 1 | ||||
| -rw-r--r-- | third/CMakeLists.txt | 8 | ||||
| -rw-r--r-- | third/Other.cs | 14 | ||||
| -rw-r--r-- | third/Program.cs | 10 |
4 files changed, 33 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 350a814..bd372c7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,5 +15,6 @@ add_subdirectory(baz) add_subdirectory(foobar) add_subdirectory(hello) add_subdirectory(second) +add_subdirectory(third) dotnet_finalize_targets() diff --git a/third/CMakeLists.txt b/third/CMakeLists.txt new file mode 100644 index 0000000..df0b157 --- /dev/null +++ b/third/CMakeLists.txt @@ -0,0 +1,8 @@ +add_dotnet_target(Third) + +file(GLOB THIRD_SOURCES CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/*.cs) + +add_dotnet_executable(Third + MAIN Program + SOURCES ${THIRD_SOURCES} +) diff --git a/third/Other.cs b/third/Other.cs new file mode 100644 index 0000000..fbad5b6 --- /dev/null +++ b/third/Other.cs @@ -0,0 +1,14 @@ +using System; + +namespace Third +{ + public static class Other + { + public static void Haiku() + { + Console.WriteLine("Bugs in the code"); + Console.WriteLine("Winter compiles silently"); + Console.WriteLine("Spring runs with no bugs"); + } + } +} diff --git a/third/Program.cs b/third/Program.cs new file mode 100644 index 0000000..1afea0d --- /dev/null +++ b/third/Program.cs @@ -0,0 +1,10 @@ +using System; + +class Program +{ + static void Main() + { + Console.WriteLine("Third Project"); + Third.Other.Haiku(); + } +} |
