pdxcodemonkey commented on a change in pull request #750:
URL: https://github.com/apache/geode-native/pull/750#discussion_r582117337
##########
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}"
Review comment:
Sorry, wrong choice of words. Not a random GUID at all (yes I Googled
it), but still basically a magic number. Looks like this is the way everyone
has decided to work with VS projects in cmake, though, so meh.
----------------------------------------------------------------
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]