Skip to content

Commit fb2a112

Browse files
committed
Remove path macro for libtestsharedlib
Signed-off-by: Shreyas Atre <[email protected]>
1 parent 1976d0c commit fb2a112

File tree

2 files changed

+6
-18
lines changed

2 files changed

+6
-18
lines changed

unittests/CppInterOp/CMakeLists.txt

-4
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ target_link_libraries(DynamicLibraryManagerTests
2828
clangCppInterOp
2929
)
3030

31-
target_compile_definitions(DynamicLibraryManagerTests
32-
PRIVATE CPPINTEROP_LIB_TestSharedLib_DIR_PREFIX=${CMAKE_BINARY_DIR}/unittests/bin/$<CONFIG>/
33-
)
34-
3531
set_output_directory(DynamicLibraryManagerTests BINARY_DIR ${CMAKE_BINARY_DIR}/unittests/bin/$<CONFIG>/)
3632

3733
add_dependencies(DynamicLibraryManagerTests TestSharedLib)

unittests/CppInterOp/DynamicLibraryManagerTest.cpp

+6-14
Original file line numberDiff line numberDiff line change
@@ -62,23 +62,15 @@ TEST(DynamicLibraryManagerTest, Sanity) {
6262

6363
TEST(UtilsPlatform, DLTest) {
6464
std::string err = "";
65-
// CPPINTEROP_LIB_TestSharedLib_DIR_PREFIX specified by cmake though target
66-
// definitions
6765
#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);
66+
auto dlopen_handle =
67+
Cpp::utils::platform::DLOpen("./libTestSharedLib.dylib", err);
7268
#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);
69+
auto dlopen_handle =
70+
Cpp::utils::platform::DLOpen("./libTestSharedLib.dll", err);
7771
#else
78-
auto dlopen_handle = Cpp::utils::platform::DLOpen(
79-
CPP_INTEROP_STRINGIFY(
80-
CPPINTEROP_LIB_TestSharedLib_DIR_PREFIX) "./libTestSharedLib.so",
81-
err);
72+
auto dlopen_handle =
73+
Cpp::utils::platform::DLOpen("./libTestSharedLib.so", err);
8274
#endif
8375
EXPECT_TRUE(dlopen_handle);
8476
EXPECT_TRUE(err.empty());

0 commit comments

Comments
 (0)