diff options
author | Luqun Lou <luqunl@users.noreply.github.com> | 2018-09-26 09:32:26 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-26 09:32:26 -0700 |
commit | e2a45dce9a853c3eead8aa635317f5615d60bdb6 (patch) | |
tree | 645c17b7217e149e937adff3335d11838e787647 /tests/src | |
parent | f5f73ff2758f5c308561716fe8fb8b7cf6bc3cda (diff) | |
download | coreclr-e2a45dce9a853c3eead8aa635317f5615d60bdb6.tar.gz coreclr-e2a45dce9a853c3eead8aa635317f5615d60bdb6.tar.bz2 coreclr-e2a45dce9a853c3eead8aa635317f5615d60bdb6.zip |
Use platformdefines through lib instead of cpp (#19948)
* Use platformdefines through lib instead of cpp
* add a dummy export function
* Remove dummy export
* Compile as Static Library
* revert platformdefines.cpp file
* remove DLL_EXPORT
Diffstat (limited to 'tests/src')
4 files changed, 14 insertions, 3 deletions
diff --git a/tests/src/Common/Platform/CMakeLists.txt b/tests/src/Common/Platform/CMakeLists.txt new file mode 100755 index 0000000000..4aeab2d3b0 --- /dev/null +++ b/tests/src/Common/Platform/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required (VERSION 2.6) +project (platformdefines) +set(SOURCES platformdefines.cpp) + +# add the executable +add_library(platformdefines STATIC ${SOURCES}) + +# add the install targets +install (TARGETS platformdefines DESTINATION bin) diff --git a/tests/src/Interop/CMakeLists.txt b/tests/src/Interop/CMakeLists.txt index 76384b488d..c4b2c87830 100644 --- a/tests/src/Interop/CMakeLists.txt +++ b/tests/src/Interop/CMakeLists.txt @@ -5,6 +5,8 @@ if(WIN32) ) endif(WIN32) +list(APPEND LINK_LIBRARIES_ADDITIONAL platformdefines) + # Consumed by native test assets SET(CLR_INTEROP_TEST_ROOT ${CMAKE_CURRENT_SOURCE_DIR}) @@ -27,13 +29,13 @@ add_subdirectory(StringMarshalling/UTF8) add_subdirectory(MarshalAPI/FunctionPointer) add_subdirectory(MarshalAPI/IUnknown) add_subdirectory(SizeConst) -add_subdirectory(DllImportAttribute/ExeFile) add_subdirectory(DllImportAttribute/FileNameContainDot) add_subdirectory(DllImportAttribute/Simple) if(WIN32) add_subdirectory(COM/NativeServer) add_subdirectory(COM/NativeClients/Primitives) + add_subdirectory(DllImportAttribute/ExeFile) add_subdirectory(IJW/FakeMscoree) # IJW isn't supported on ARM64 diff --git a/tests/src/Interop/FuncPtrAsDelegateParam/FuncPtrAsDelegateParamNative.cpp b/tests/src/Interop/FuncPtrAsDelegateParam/FuncPtrAsDelegateParamNative.cpp index 975f57ba08..72617d182e 100644 --- a/tests/src/Interop/FuncPtrAsDelegateParam/FuncPtrAsDelegateParamNative.cpp +++ b/tests/src/Interop/FuncPtrAsDelegateParam/FuncPtrAsDelegateParamNative.cpp @@ -1,4 +1,4 @@ -#include "platformdefines.cpp" +#include "platformdefines.h" #include <stdio.h> #include <stdlib.h> #include <xplatform.h> diff --git a/tests/src/Interop/StructMarshalling/PInvoke/MarshalStructAsParamDLL.h b/tests/src/Interop/StructMarshalling/PInvoke/MarshalStructAsParamDLL.h index 33e4ee0f20..0f04c84705 100644 --- a/tests/src/Interop/StructMarshalling/PInvoke/MarshalStructAsParamDLL.h +++ b/tests/src/Interop/StructMarshalling/PInvoke/MarshalStructAsParamDLL.h @@ -1,4 +1,4 @@ -#include "platformdefines.cpp" +#include "platformdefines.h" #include <xplatform.h> inline char* CoStrDup(const char* str) |