pivotal-jbarrett commented on a change in pull request #750:
URL: https://github.com/apache/geode-native/pull/750#discussion_r581373661



##########
File path: clicache/integration-test/CMakeLists.txt
##########
@@ -13,108 +13,110 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-project(nativeclient.tests.clicache)
+project(Apache.Geode.Client.UnitTests CSharp )
 
-set (NUNIT "C:\\Program Files (x86)\\NUnit 2.6.4")
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/packages.config 
${CMAKE_CURRENT_BINARY_DIR}/packages.config COPYONLY)
 
-if (64 EQUAL ${BUILD_BITS})
-  set (NUNIT_CONSOLE "nunit-console")
-else()
-  set (NUNIT_CONSOLE "nunit-console-x86")
-endif()
+file(GLOB_RECURSE SOURCE RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.cs")
+file(GLOB_RECURSE XML_SOURCE RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.xml")
+set(RESOURCES
+  ${XML_SOURCE}
+  geode.properties.mixed
+  geode.properties.nativeclient
+  system.properties
+)
+
+add_library(Apache.Geode.Client.UnitTests SHARED
+  NUnitTestAddTests.ps1
+  packages.config
+  test.runsettings.in
+  ${SOURCE}
+  ${RESOURCES}
+)
 
+source_group("Source Files" FILES "${SOURCE}")
+source_group("Resource Files" FILES ${RESOURCES})
 
-foreach(var CMAKE_CURRENT_SOURCE_DIR CMAKE_SOURCE_DIR CMAKE_BINARY_DIR 
CMAKE_CURRENT_BINARY_DIR)
-  file(TO_NATIVE_PATH ${${var}} ${var}_NATIVE)
-endforeach()
+set_source_files_properties(
+  ${RESOURCES}
+  PROPERTIES
+    VS_COPY_TO_OUT_DIR PreserveNewest
+    VS_TOOL_OVERRIDE None
+)
+
+target_link_libraries(Apache.Geode.Client.UnitTests
+  PUBLIC
+    Apache.Geode
+    DUnitFramework
+    NewTestObject
+    PdxClassLibrary
+    PdxVersion1Lib
+    PdxVersion2Lib
+    QueryWrapper
+    SecurityUtil
+)
 
-file(GLOB_RECURSE CSPROJECTS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} 
"*.csproj.in")
-if(EXISTS "${STRONG_NAME_KEY}")
-  set(STRONG_NAME_KEY_ENABLED true)
+set_target_properties(Apache.Geode.Client.UnitTests PROPERTIES
+  VS_GLOBAL_ROOTNAMESPACE "Apache.Geode.Client.UnitTests"
+  VS_GLOBAL_TreatWarningsAsErrors False
+  VS_GLOBAL_IsTestProject True
+  VS_GLOBAL_TestProjectType UnitTest
+  VS_GLOBAL_RunSettingsFilePath "\$(MSBuildProjectDirectory)\\test.runsettings"
+  VS_GLOBAL_PROJECT_TYPES 
"{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
+  VS_DOTNET_REFERENCES 
"System;System.Xml;System.Web;System.Configuration;System.Management"
+  VS_DOTNET_REFERENCE_NUnit 
"${CMAKE_BINARY_DIR}/packages/NUnit.2.6.4/lib/nunit.framework.dll"
+  FOLDER cli/test/integration
+)
+
+if(NOT "${STRONG_NAME_KEY}" STREQUAL "")
+  set_target_properties(Apache.Geode.Client.UnitTests PROPERTIES
+    VS_GLOBAL_SignAssembly "true"
+    VS_GLOBAL_AssemblyOriginatorKeyFile ${STRONG_NAME_KEY}
+  )
 endif()
 
-foreach(FILE ${CSPROJECTS})
-  # TODO: make this a one line MATCH statement
-  string(REGEX REPLACE "\\.csproj.in" "" PROJDIR ${FILE})
-  string(REGEX REPLACE ".*/" "" PROJNAME ${PROJDIR})
-  configure_file(${FILE} ${CMAKE_CURRENT_BINARY_DIR}/${PROJNAME}.csproj)
-  include_external_msproject(
-      ${PROJNAME}  ${CMAKE_CURRENT_BINARY_DIR}/${PROJNAME}.csproj
-      TYPE FAE04EC0-301F-11D3-BF4B-00C04F79EFBC)
-  set_target_properties(${PROJNAME} PROPERTIES FOLDER cli/test/integration)
+add_dependencies(Apache.Geode.Client.UnitTests FwkClient SqLiteImpl)
+add_dependencies(Apache.Geode.Client.UnitTests nuget-restore)
 
-endforeach()
+
+configure_file(test.runsettings.in test.runsettings.gen)
+file(GENERATE OUTPUT test.runsettings INPUT 
${CMAKE_CURRENT_BINARY_DIR}/test.runsettings.gen TARGET 
Apache.Geode.Client.UnitTests)

Review comment:
       Nope, no target specific generator expressions so I can drop it. Thanks!




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to