summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-05-04 15:27:37 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-05-04 15:27:43 (GMT)
commit8314edd065a746e0e2c83dc524a6712a184b635b (patch)
tree8e4ae66f0640efafc328f925da80d70a1012c76f /Tests
parenta0594739d1ee422fd27581ac914c178ef39b0339 (diff)
parentd8786bfa16889f445a37bee7e665948e7a134c13 (diff)
downloadCMake-8314edd065a746e0e2c83dc524a6712a184b635b.zip
CMake-8314edd065a746e0e2c83dc524a6712a184b635b.tar.gz
CMake-8314edd065a746e0e2c83dc524a6712a184b635b.tar.bz2
Merge topic 'vs-config-specific-csproj'
d8786bfa16 VS: Add support for per-config C# sources Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6055
Diffstat (limited to 'Tests')
-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;
+ }
+ }
+}