diff options
author | Brad King <brad.king@kitware.com> | 2021-05-04 15:27:37 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2021-05-04 15:27:43 (GMT) |
commit | 8314edd065a746e0e2c83dc524a6712a184b635b (patch) | |
tree | 8e4ae66f0640efafc328f925da80d70a1012c76f /Tests | |
parent | a0594739d1ee422fd27581ac914c178ef39b0339 (diff) | |
parent | d8786bfa16889f445a37bee7e665948e7a134c13 (diff) | |
download | CMake-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.txt | 7 | ||||
-rw-r--r-- | Tests/CSharpOnly/config_specific_main_debug.cs | 10 | ||||
-rw-r--r-- | Tests/CSharpOnly/config_specific_main_no_exist.cs | 10 | ||||
-rw-r--r-- | Tests/CSharpOnly/config_specific_main_not_debug.cs | 10 |
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; + } + } +} |