summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build-test.cmd11
-rwxr-xr-xtests/setup-runtime-dependencies.cmd6
-rw-r--r--tests/src/Interop/ArrayMarshalling/BoolArray/CMakeLists.txt1
-rw-r--r--tests/src/Interop/ArrayMarshalling/ByValArray/CMakeLists.txt1
-rwxr-xr-xtests/src/Interop/BestFitMapping/CMakeLists.txt1
-rw-r--r--tests/src/Interop/CMakeLists.txt8
-rw-r--r--tests/src/Interop/FuncPtrAsDelegateParam/CMakeLists.txt1
-rw-r--r--tests/src/Interop/NativeCallable/CMakeLists.txt1
-rw-r--r--tests/src/Interop/PrimitiveMarshalling/Bool/CMakeLists.txt1
-rw-r--r--tests/src/Interop/PrimitiveMarshalling/EnumMarshalling/CMakeLists.txt1
-rw-r--r--tests/src/Interop/PrimitiveMarshalling/UIntPtr/CMakeLists.txt1
-rwxr-xr-xtests/src/Interop/RefCharArray/CMakeLists.txt1
-rw-r--r--tests/src/Interop/SimpleStruct/CMakeLists.txt1
-rwxr-xr-xtests/src/Interop/StringMarshalling/LPSTR/CMakeLists.txt1
-rwxr-xr-xtests/src/Interop/StringMarshalling/LPTSTR/CMakeLists.txt1
-rw-r--r--tests/src/Interop/StringMarshalling/UTF8/CMakeLists.txt1
-rw-r--r--tests/src/Interop/StructMarshalling/PInvoke/CMakeLists.txt1
17 files changed, 33 insertions, 6 deletions
diff --git a/build-test.cmd b/build-test.cmd
index 282a38193e..d22b489bd4 100644
--- a/build-test.cmd
+++ b/build-test.cmd
@@ -3,6 +3,7 @@ setlocal EnableDelayedExpansion
:: Set the default arguments for build
set __BuildArch=x64
+set __VCBuildArch=x86_amd64
set __BuildType=Debug
set __BuildOS=Windows_NT
set __VSVersion=vs2015
@@ -35,16 +36,15 @@ if /i "%1" == "-?" goto Usage
if /i "%1" == "-h" goto Usage
if /i "%1" == "-help" goto Usage
-if /i "%1" == "x64" (set __BuildArch=x64&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "x86" (set __BuildArch=x86&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "arm" (set __BuildArch=arm&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
+if /i "%1" == "x64" (set __BuildArch=x64&set __VCBuildArch=x86_amd64&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
+if /i "%1" == "x86" (set __BuildArch=x86&set __VCBuildArch=x86&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
+if /i "%1" == "arm" (set __BuildArch=arm&set __VCBuildArch=x86_arm&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
if /i "%1" == "arm64" (set __BuildArch=arm64&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
if /i "%1" == "debug" (set __BuildType=Debug&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
if /i "%1" == "release" (set __BuildType=Release&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
if /i "%1" == "checked" (set __BuildType=Checked&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "crossgen" (set __crossgen=true&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
if /i "%1" == "skipmanaged" (set __SkipManaged=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
if /i "%1" == "updateinvalidpackages" (set __UpdateInvalidPackagesArg=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
if /i "%1" == "toolset_dir" (set __ToolsetDir=%2&set __PassThroughArgs=%__PassThroughArgs% %2&set processedArgs=!processedArgs! %1 %2&shift&shift&goto Arg_Loop)
@@ -128,7 +128,7 @@ if defined __ToolsetDir (
:: Set the environment for the native build
echo %__MsgPrefix%Using environment: "%__VSToolsRoot%\..\..\VC\vcvarsall.bat" %__VCBuildArch%
-call "%__VSToolsRoot%\..\..\VC\vcvarsall.bat" x86_amd64
+call "%__VSToolsRoot%\..\..\VC\vcvarsall.bat" %__VCBuildArch%
@if defined __echo @echo on
if not defined VSINSTALLDIR (
@@ -252,7 +252,6 @@ echo.
echo. -? -h -help: view this message.
echo Build architecture: -buildArch: only x64 is currently allowed ^(default: x64^).
echo Build type: -buildType: one of Debug, Checked, Release ^(default: Debug^).
-echo crossgen: enables the tests to run crossgen on the test executables before executing them.
echo updateinvalidpackageversions: Runs the target to update package versions.
echo -- ... : all arguments following this tag will be passed directly to msbuild.
echo -priority=^<N^> : specify a set of test that will be built and run, with priority N.
diff --git a/tests/setup-runtime-dependencies.cmd b/tests/setup-runtime-dependencies.cmd
index 2cc2d773a2..6369457af8 100755
--- a/tests/setup-runtime-dependencies.cmd
+++ b/tests/setup-runtime-dependencies.cmd
@@ -35,6 +35,12 @@ goto Usage
if not defined __OutputDir goto Usage
if not defined __Arch goto Usage
+REM Check if the platform is supported
+if /i %__Arch% == "arm" (
+ echo No runtime dependencies for Arm32.
+ exit /b 0
+ )
+
REM =========================================================================================
REM ===
REM === Check if dotnet CLI and necessary directories exist
diff --git a/tests/src/Interop/ArrayMarshalling/BoolArray/CMakeLists.txt b/tests/src/Interop/ArrayMarshalling/BoolArray/CMakeLists.txt
index 8cc5be3bed..da43913b33 100644
--- a/tests/src/Interop/ArrayMarshalling/BoolArray/CMakeLists.txt
+++ b/tests/src/Interop/ArrayMarshalling/BoolArray/CMakeLists.txt
@@ -5,6 +5,7 @@ set(SOURCES MarshalBoolArrayNative.cpp)
# add the executable
add_library (MarshalBoolArrayNative SHARED ${SOURCES})
+target_link_libraries(MarshalBoolArrayNative ${LINK_LIBRARIES_ADDITIONAL})
# add the install targets
install (TARGETS MarshalBoolArrayNative DESTINATION bin)
diff --git a/tests/src/Interop/ArrayMarshalling/ByValArray/CMakeLists.txt b/tests/src/Interop/ArrayMarshalling/ByValArray/CMakeLists.txt
index 9c13ce0526..043339cd08 100644
--- a/tests/src/Interop/ArrayMarshalling/ByValArray/CMakeLists.txt
+++ b/tests/src/Interop/ArrayMarshalling/ByValArray/CMakeLists.txt
@@ -5,6 +5,7 @@ set(SOURCES MarshalArrayByValNative.cpp)
# add the executable
add_library (MarshalArrayByValNative SHARED ${SOURCES})
+target_link_libraries(MarshalArrayByValNative ${LINK_LIBRARIES_ADDITIONAL})
# add the install targets
install (TARGETS MarshalArrayByValNative DESTINATION bin)
diff --git a/tests/src/Interop/BestFitMapping/CMakeLists.txt b/tests/src/Interop/BestFitMapping/CMakeLists.txt
index 23b45ece1f..8971ec3a66 100755
--- a/tests/src/Interop/BestFitMapping/CMakeLists.txt
+++ b/tests/src/Interop/BestFitMapping/CMakeLists.txt
@@ -4,6 +4,7 @@ set(SOURCES BestFitMappingNative.cpp )
# add the executable
add_library (BestFitMappingNative SHARED ${SOURCES})
+target_link_libraries(BestFitMappingNative ${LINK_LIBRARIES_ADDITIONAL})
#get_cmake_property(_variableNames VARIABLES)
#foreach (_variableName ${_variableNames})
diff --git a/tests/src/Interop/CMakeLists.txt b/tests/src/Interop/CMakeLists.txt
index cf2cada7a6..fc6ee5d2e6 100644
--- a/tests/src/Interop/CMakeLists.txt
+++ b/tests/src/Interop/CMakeLists.txt
@@ -1,4 +1,12 @@
+if(WIN32)
+ if(CLR_CMAKE_HOST_ARCH STREQUAL arm)
+ list(APPEND LINK_LIBRARIES_ADDITIONAL
+ ole32.lib
+ )
+ endif(CLR_CMAKE_HOST_ARCH STREQUAL arm)
+endif(WIN32)
+
include_directories(common)
add_subdirectory(NativeCallable)
add_subdirectory(PrimitiveMarshalling/Bool)
diff --git a/tests/src/Interop/FuncPtrAsDelegateParam/CMakeLists.txt b/tests/src/Interop/FuncPtrAsDelegateParam/CMakeLists.txt
index 3fa62f1b84..3393155189 100644
--- a/tests/src/Interop/FuncPtrAsDelegateParam/CMakeLists.txt
+++ b/tests/src/Interop/FuncPtrAsDelegateParam/CMakeLists.txt
@@ -5,6 +5,7 @@ set(SOURCES FuncPtrAsDelegateParamNative.cpp )
# add the executable
add_library (FuncPtrAsDelegateParamNative SHARED ${SOURCES})
+target_link_libraries(FuncPtrAsDelegateParamNative ${LINK_LIBRARIES_ADDITIONAL})
# add the install targets
install (TARGETS FuncPtrAsDelegateParamNative DESTINATION bin) \ No newline at end of file
diff --git a/tests/src/Interop/NativeCallable/CMakeLists.txt b/tests/src/Interop/NativeCallable/CMakeLists.txt
index 5236b3c873..e8ab51f8ef 100644
--- a/tests/src/Interop/NativeCallable/CMakeLists.txt
+++ b/tests/src/Interop/NativeCallable/CMakeLists.txt
@@ -4,6 +4,7 @@ set(SOURCES NativeCallableDll.cpp )
# add the executable
add_library (NativeCallableDll SHARED ${SOURCES})
+target_link_libraries(NativeCallableDll ${LINK_LIBRARIES_ADDITIONAL})
# add the install targets
install (TARGETS NativeCallableDll DESTINATION bin)
diff --git a/tests/src/Interop/PrimitiveMarshalling/Bool/CMakeLists.txt b/tests/src/Interop/PrimitiveMarshalling/Bool/CMakeLists.txt
index 9170660fc0..4877b53a7a 100644
--- a/tests/src/Interop/PrimitiveMarshalling/Bool/CMakeLists.txt
+++ b/tests/src/Interop/PrimitiveMarshalling/Bool/CMakeLists.txt
@@ -4,6 +4,7 @@ set(SOURCES BoolNative.cpp )
# add the executable
add_library (BoolNative SHARED ${SOURCES})
+target_link_libraries(BoolNative ${LINK_LIBRARIES_ADDITIONAL})
#get_cmake_property(_variableNames VARIABLES)
#foreach (_variableName ${_variableNames})
diff --git a/tests/src/Interop/PrimitiveMarshalling/EnumMarshalling/CMakeLists.txt b/tests/src/Interop/PrimitiveMarshalling/EnumMarshalling/CMakeLists.txt
index 42eaff6394..70dffaa54e 100644
--- a/tests/src/Interop/PrimitiveMarshalling/EnumMarshalling/CMakeLists.txt
+++ b/tests/src/Interop/PrimitiveMarshalling/EnumMarshalling/CMakeLists.txt
@@ -4,6 +4,7 @@ set(SOURCES MarshalEnumNative.cpp )
# add the executable
add_library (MarshalEnumNative SHARED ${SOURCES})
+target_link_libraries(MarshalEnumNative ${LINK_LIBRARIES_ADDITIONAL})
# add the install targets
install (TARGETS MarshalEnumNative DESTINATION bin) \ No newline at end of file
diff --git a/tests/src/Interop/PrimitiveMarshalling/UIntPtr/CMakeLists.txt b/tests/src/Interop/PrimitiveMarshalling/UIntPtr/CMakeLists.txt
index a748623ab3..62ce00481b 100644
--- a/tests/src/Interop/PrimitiveMarshalling/UIntPtr/CMakeLists.txt
+++ b/tests/src/Interop/PrimitiveMarshalling/UIntPtr/CMakeLists.txt
@@ -5,6 +5,7 @@ set(SOURCES UIntPtrNative.cpp )
# add the executable
add_library (UIntPtrNative SHARED ${SOURCES})
+target_link_libraries(UIntPtrNative ${LINK_LIBRARIES_ADDITIONAL})
# add the install targets
install (TARGETS UIntPtrNative DESTINATION bin) \ No newline at end of file
diff --git a/tests/src/Interop/RefCharArray/CMakeLists.txt b/tests/src/Interop/RefCharArray/CMakeLists.txt
index d8f902cf67..e07b407ab0 100755
--- a/tests/src/Interop/RefCharArray/CMakeLists.txt
+++ b/tests/src/Interop/RefCharArray/CMakeLists.txt
@@ -4,6 +4,7 @@ set(SOURCES RefCharArrayNative.cpp )
# add the executable
add_library (RefCharArrayNative SHARED ${SOURCES})
+target_link_libraries(RefCharArrayNative ${LINK_LIBRARIES_ADDITIONAL})
#get_cmake_property(_variableNames VARIABLES)
#foreach (_variableName ${_variableNames})
diff --git a/tests/src/Interop/SimpleStruct/CMakeLists.txt b/tests/src/Interop/SimpleStruct/CMakeLists.txt
index 4f990270df..a797a2680b 100644
--- a/tests/src/Interop/SimpleStruct/CMakeLists.txt
+++ b/tests/src/Interop/SimpleStruct/CMakeLists.txt
@@ -5,6 +5,7 @@ set(SOURCES SimpleStructNative.cpp )
# add the executable
add_library (SimpleStructNative SHARED ${SOURCES})
+target_link_libraries(SimpleStructNative ${LINK_LIBRARIES_ADDITIONAL})
# add the install targets
install (TARGETS SimpleStructNative DESTINATION bin) \ No newline at end of file
diff --git a/tests/src/Interop/StringMarshalling/LPSTR/CMakeLists.txt b/tests/src/Interop/StringMarshalling/LPSTR/CMakeLists.txt
index b4dcd2c384..aa3fd76ff6 100755
--- a/tests/src/Interop/StringMarshalling/LPSTR/CMakeLists.txt
+++ b/tests/src/Interop/StringMarshalling/LPSTR/CMakeLists.txt
@@ -4,6 +4,7 @@ set(SOURCES LPSTRTestNative.cpp )
# add the executable
add_library (LPSTRTestNative SHARED ${SOURCES})
+target_link_libraries(LPSTRTestNative ${LINK_LIBRARIES_ADDITIONAL})
# add the install targets
install (TARGETS LPSTRTestNative DESTINATION bin) \ No newline at end of file
diff --git a/tests/src/Interop/StringMarshalling/LPTSTR/CMakeLists.txt b/tests/src/Interop/StringMarshalling/LPTSTR/CMakeLists.txt
index f55984834c..f99a6e5ab7 100755
--- a/tests/src/Interop/StringMarshalling/LPTSTR/CMakeLists.txt
+++ b/tests/src/Interop/StringMarshalling/LPTSTR/CMakeLists.txt
@@ -4,6 +4,7 @@ set(SOURCES LPTSTRTestNative.cpp )
# add the executable
add_library (LPTSTRTestNative SHARED ${SOURCES})
+target_link_libraries(LPTSTRTestNative ${LINK_LIBRARIES_ADDITIONAL})
# add the install targets
install (TARGETS LPTSTRTestNative DESTINATION bin) \ No newline at end of file
diff --git a/tests/src/Interop/StringMarshalling/UTF8/CMakeLists.txt b/tests/src/Interop/StringMarshalling/UTF8/CMakeLists.txt
index 1e8edbf563..37c952df10 100644
--- a/tests/src/Interop/StringMarshalling/UTF8/CMakeLists.txt
+++ b/tests/src/Interop/StringMarshalling/UTF8/CMakeLists.txt
@@ -4,6 +4,7 @@ set(SOURCES UTF8TestNative.cpp )
# add the executable
add_library (UTF8TestNative SHARED ${SOURCES})
+target_link_libraries(UTF8TestNative ${LINK_LIBRARIES_ADDITIONAL})
# add the install targets
install (TARGETS UTF8TestNative DESTINATION bin) \ No newline at end of file
diff --git a/tests/src/Interop/StructMarshalling/PInvoke/CMakeLists.txt b/tests/src/Interop/StructMarshalling/PInvoke/CMakeLists.txt
index dc1e16f241..860c2e8c80 100644
--- a/tests/src/Interop/StructMarshalling/PInvoke/CMakeLists.txt
+++ b/tests/src/Interop/StructMarshalling/PInvoke/CMakeLists.txt
@@ -5,6 +5,7 @@ set(SOURCES MarshalStructAsParamDLL.cpp)
# add the executable
add_library (MarshalStructAsParam SHARED ${SOURCES})
+target_link_libraries(MarshalStructAsParam ${LINK_LIBRARIES_ADDITIONAL})
# add the install targets
install (TARGETS MarshalStructAsParam DESTINATION bin) \ No newline at end of file