diff --git a/unittests/CppInterOp/CMakeLists.txt b/unittests/CppInterOp/CMakeLists.txt index 5c66d237..9fe46542 100644 --- a/unittests/CppInterOp/CMakeLists.txt +++ b/unittests/CppInterOp/CMakeLists.txt @@ -28,10 +28,6 @@ target_link_libraries(DynamicLibraryManagerTests clangCppInterOp ) -target_compile_definitions(DynamicLibraryManagerTests - PRIVATE CPPINTEROP_LIB_TestSharedLib_DIR_PREFIX=${CMAKE_BINARY_DIR}/unittests/bin/$/ -) - set_output_directory(DynamicLibraryManagerTests BINARY_DIR ${CMAKE_BINARY_DIR}/unittests/bin/$/) add_dependencies(DynamicLibraryManagerTests TestSharedLib) diff --git a/unittests/CppInterOp/DynamicLibraryManagerTest.cpp b/unittests/CppInterOp/DynamicLibraryManagerTest.cpp index 816f83c9..84e43381 100644 --- a/unittests/CppInterOp/DynamicLibraryManagerTest.cpp +++ b/unittests/CppInterOp/DynamicLibraryManagerTest.cpp @@ -62,23 +62,15 @@ TEST(DynamicLibraryManagerTest, Sanity) { TEST(UtilsPlatform, DLTest) { std::string err = ""; - // CPPINTEROP_LIB_TestSharedLib_DIR_PREFIX specified by cmake though target - // definitions #if defined(__APPLE__) - auto dlopen_handle = Cpp::utils::platform::DLOpen( - CPP_INTEROP_STRINGIFY( - CPPINTEROP_LIB_TestSharedLib_DIR_PREFIX) "./libTestSharedLib.dylib", - err); + auto dlopen_handle = + Cpp::utils::platform::DLOpen("./libTestSharedLib.dylib", err); #elif defined(_WIN32) - auto dlopen_handle = Cpp::utils::platform::DLOpen( - CPP_INTEROP_STRINGIFY( - CPPINTEROP_LIB_TestSharedLib_DIR_PREFIX) "./libTestSharedLib.dll", - err); + auto dlopen_handle = + Cpp::utils::platform::DLOpen("./libTestSharedLib.dll", err); #else - auto dlopen_handle = Cpp::utils::platform::DLOpen( - CPP_INTEROP_STRINGIFY( - CPPINTEROP_LIB_TestSharedLib_DIR_PREFIX) "./libTestSharedLib.so", - err); + auto dlopen_handle = + Cpp::utils::platform::DLOpen("./libTestSharedLib.so", err); #endif EXPECT_TRUE(dlopen_handle); EXPECT_TRUE(err.empty());