|
7 | 7 |
|
8 | 8 | #include "../../lib/Interpreter/Paths.h"
|
9 | 9 |
|
10 |
| -#define XCPP_INTEROP_STRINGIFY(x) #x |
11 |
| -#define CPP_INTEROP_STRINGIFY(x) XCPP_INTEROP_STRINGIFY(x) |
12 |
| - |
13 | 10 | // This function isn't referenced outside its translation unit, but it
|
14 | 11 | // can't use the "static" keyword because its address is used for
|
15 | 12 | // GetMainExecutable (since some platforms don't support taking the
|
@@ -62,23 +59,15 @@ TEST(DynamicLibraryManagerTest, Sanity) {
|
62 | 59 |
|
63 | 60 | TEST(UtilsPlatform, DLTest) {
|
64 | 61 | std::string err = "";
|
65 |
| - // CPPINTEROP_LIB_TestSharedLib_DIR_PREFIX specified by cmake though target |
66 |
| - // definitions |
67 | 62 | #if defined(__APPLE__)
|
68 |
| - auto dlopen_handle = Cpp::utils::platform::DLOpen( |
69 |
| - CPP_INTEROP_STRINGIFY( |
70 |
| - CPPINTEROP_LIB_TestSharedLib_DIR_PREFIX) "./libTestSharedLib.dylib", |
71 |
| - err); |
| 63 | + auto dlopen_handle = |
| 64 | + Cpp::utils::platform::DLOpen("./libTestSharedLib.dylib", err); |
72 | 65 | #elif defined(_WIN32)
|
73 |
| - auto dlopen_handle = Cpp::utils::platform::DLOpen( |
74 |
| - CPP_INTEROP_STRINGIFY( |
75 |
| - CPPINTEROP_LIB_TestSharedLib_DIR_PREFIX) "./libTestSharedLib.dll", |
76 |
| - err); |
| 66 | + auto dlopen_handle = |
| 67 | + Cpp::utils::platform::DLOpen("./libTestSharedLib.dll", err); |
77 | 68 | #else
|
78 |
| - auto dlopen_handle = Cpp::utils::platform::DLOpen( |
79 |
| - CPP_INTEROP_STRINGIFY( |
80 |
| - CPPINTEROP_LIB_TestSharedLib_DIR_PREFIX) "./libTestSharedLib.so", |
81 |
| - err); |
| 69 | + auto dlopen_handle = |
| 70 | + Cpp::utils::platform::DLOpen("./libTestSharedLib.so", err); |
82 | 71 | #endif
|
83 | 72 | EXPECT_TRUE(dlopen_handle);
|
84 | 73 | EXPECT_TRUE(err.empty());
|
|
0 commit comments