summaryrefslogtreecommitdiffstats
path: root/Tests/CSharpOnly
diff options
context:
space:
mode:
authorThomas Vaughan <thomas.vaughan@cnrc-nrc.gc.ca>2021-05-03 12:53:09 (GMT)
committerThomas Vaughan <thomas.vaughan@cnrc-nrc.gc.ca>2021-05-03 14:49:47 (GMT)
commitd8786bfa16889f445a37bee7e665948e7a134c13 (patch)
tree9bd7269fba05f24a7d15048fc3935caf28e7aee9 /Tests/CSharpOnly
parent95afd879176256b17db44682d0664b87827c599b (diff)
downloadCMake-d8786bfa16889f445a37bee7e665948e7a134c13.zip
CMake-d8786bfa16889f445a37bee7e665948e7a134c13.tar.gz
CMake-d8786bfa16889f445a37bee7e665948e7a134c13.tar.bz2
VS: Add support for per-config C# sources
Fixes: #22108
Diffstat (limited to 'Tests/CSharpOnly')
-rw-r--r--Tests/CSharpOnly/CMakeLists.txt7
-rw-r--r--Tests/CSharpOnly/config_specific_main_debug.cs10
-rw-r--r--Tests/CSharpOnly/config_specific_main_no_exist.cs10
-rw-r--r--Tests/CSharpOnly/config_specific_main_not_debug.cs10
4 files changed, 36 insertions, 1 deletions
diff --git a/Tests/CSharpOnly/CMakeLists.txt b/Tests/CSharpOnly/CMakeLists.txt
index 195af05..f7928b6 100644
--- a/Tests/CSharpOnly/CMakeLists.txt
+++ b/Tests/CSharpOnly/CMakeLists.txt
@@ -9,8 +9,13 @@ source_group(nested FILES nested/lib1.cs)
add_library(lib2 SHARED lib2.cs)
add_executable(CSharpOnly csharponly.cs)
-
target_link_libraries(CSharpOnly lib1 lib2)
+add_executable(CSharpConfigSpecific
+ $<$<CONFIG:Debug>:config_specific_main_debug.cs>
+ $<$<NOT:$<CONFIG:Debug>>:config_specific_main_not_debug.cs>
+ $<$<CONFIG:NotAConfig>:config_specific_main_no_exist.cs>
+ )
+
add_custom_target(CSharpCustom ALL SOURCES empty.cs)
add_custom_target(custom.cs ALL DEPENDS empty.txt)
diff --git a/Tests/CSharpOnly/config_specific_main_debug.cs b/Tests/CSharpOnly/config_specific_main_debug.cs
new file mode 100644
index 0000000..b62524b
--- /dev/null
+++ b/Tests/CSharpOnly/config_specific_main_debug.cs
@@ -0,0 +1,10 @@
+namespace CSharpConfigSpecific
+{
+ class CSharpConfigSpecific
+ {
+ public static void Main(string[] args)
+ {
+ return;
+ }
+ }
+}
diff --git a/Tests/CSharpOnly/config_specific_main_no_exist.cs b/Tests/CSharpOnly/config_specific_main_no_exist.cs
new file mode 100644
index 0000000..b62524b
--- /dev/null
+++ b/Tests/CSharpOnly/config_specific_main_no_exist.cs
@@ -0,0 +1,10 @@
+namespace CSharpConfigSpecific
+{
+ class CSharpConfigSpecific
+ {
+ public static void Main(string[] args)
+ {
+ return;
+ }
+ }
+}
diff --git a/Tests/CSharpOnly/config_specific_main_not_debug.cs b/Tests/CSharpOnly/config_specific_main_not_debug.cs
new file mode 100644
index 0000000..b62524b
--- /dev/null
+++ b/Tests/CSharpOnly/config_specific_main_not_debug.cs
@@ -0,0 +1,10 @@
+namespace CSharpConfigSpecific
+{
+ class CSharpConfigSpecific
+ {
+ public static void Main(string[] args)
+ {
+ return;
+ }
+ }
+}