VS: Add support for per-config C# sources

Fixes: #22108
This commit is contained in:
Thomas Vaughan
2021-05-03 08:53:09 -04:00
parent 95afd87917
commit d8786bfa16
5 changed files with 51 additions and 2 deletions
+6 -1
View File
@@ -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)
@@ -0,0 +1,10 @@
namespace CSharpConfigSpecific
{
class CSharpConfigSpecific
{
public static void Main(string[] args)
{
return;
}
}
}
@@ -0,0 +1,10 @@
namespace CSharpConfigSpecific
{
class CSharpConfigSpecific
{
public static void Main(string[] args)
{
return;
}
}
}
@@ -0,0 +1,10 @@
namespace CSharpConfigSpecific
{
class CSharpConfigSpecific
{
public static void Main(string[] args)
{
return;
}
}
}