summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/VS10Project
diff options
context:
space:
mode:
authorKinan Mahdi <kmahdi@allplan.com>2021-04-29 15:35:04 (GMT)
committerBrad King <brad.king@kitware.com>2021-05-03 15:25:42 (GMT)
commit31bbcd19055eddef68560b61b6f977dd6f0f17ff (patch)
treeaa05aa9e7b22690ed5b58b273f81a546e2582253 /Tests/RunCMake/VS10Project
parent4e5893b658b1c360c1b2d9413dbd66b2b02dbacc (diff)
downloadCMake-31bbcd19055eddef68560b61b6f977dd6f0f17ff.zip
CMake-31bbcd19055eddef68560b61b6f977dd6f0f17ff.tar.gz
CMake-31bbcd19055eddef68560b61b6f977dd6f0f17ff.tar.bz2
VS: Fix CSharp sources inside build directory
Fixes: #22104
Diffstat (limited to 'Tests/RunCMake/VS10Project')
-rw-r--r--Tests/RunCMake/VS10Project/CSharpSourceGroup/cmake/AssemblyInfo.cs.in18
-rw-r--r--Tests/RunCMake/VS10Project/VsCsharpSourceGroup-check.cmake1
-rw-r--r--Tests/RunCMake/VS10Project/VsCsharpSourceGroup.cmake8
3 files changed, 27 insertions, 0 deletions
diff --git a/Tests/RunCMake/VS10Project/CSharpSourceGroup/cmake/AssemblyInfo.cs.in b/Tests/RunCMake/VS10Project/CSharpSourceGroup/cmake/AssemblyInfo.cs.in
new file mode 100644
index 0000000..63e5a5c
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/CSharpSourceGroup/cmake/AssemblyInfo.cs.in
@@ -0,0 +1,18 @@
+using System.Reflection;
+using System.Runtime.InteropServices;
+using System.Windows;
+
+//General Information about an assembly is controlled through the following
+//set of attributes. Change these attribute values to modify the information
+//associated with an assembly.
+
+[assembly: AssemblyTitle("")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/Tests/RunCMake/VS10Project/VsCsharpSourceGroup-check.cmake b/Tests/RunCMake/VS10Project/VsCsharpSourceGroup-check.cmake
index 80d76e4..9c9409c 100644
--- a/Tests/RunCMake/VS10Project/VsCsharpSourceGroup-check.cmake
+++ b/Tests/RunCMake/VS10Project/VsCsharpSourceGroup-check.cmake
@@ -13,6 +13,7 @@ set(SOURCE_GROUPS_TO_FIND
"CSharpSourceGroup\\\\nested\\\\baz\\.cs"
"CSharpSourceGroup\\\\images\\\\empty\\.bmp"
"VsCsharpSourceGroup\\.png"
+ "AssemblyInfo\\.cs"
)
foreach(GROUP_NAME IN LISTS SOURCE_GROUPS_TO_FIND)
diff --git a/Tests/RunCMake/VS10Project/VsCsharpSourceGroup.cmake b/Tests/RunCMake/VS10Project/VsCsharpSourceGroup.cmake
index 510d712..b67868f 100644
--- a/Tests/RunCMake/VS10Project/VsCsharpSourceGroup.cmake
+++ b/Tests/RunCMake/VS10Project/VsCsharpSourceGroup.cmake
@@ -20,3 +20,11 @@ add_library(VsCsharpSourceGroup SHARED ${SRC_FILES} ${IMAGE_FILES} ${RESOURCE_FI
source_group("CSharpSourceGroup" FILES ${CMAKE_CURRENT_SOURCE_DIR}/CSharpSourceGroup/foo.cs)
source_group("CSharpSourceGroup/nested" FILES ${CMAKE_CURRENT_SOURCE_DIR}/CSharpSourceGroup/nested/baz.cs)
source_group("Images" FILES ${IMAGE_FILES})
+
+# Test covering CMake Issue 22104.
+# Basically there should not be any link tags for files in the binary directory.
+include(CSharpUtilities)
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/CSharpSourceGroup/cmake/AssemblyInfo.cs.in" "Properties/AssemblyInfo.cs")
+
+target_sources(VsCsharpSourceGroup PRIVATE "Properties/AssemblyInfo.cs")
+csharp_set_designer_cs_properties("Properties/AssemblyInfo.cs")