Skip to content
Snippets Groups Projects
Commit c5c83a02 authored by Mathieu Malaterre's avatar Mathieu Malaterre
Browse files

BUG: Trying to get testDynamicLoader to work on Solaris and SunOS, where...

BUG: Trying to get testDynamicLoader to work on Solaris and SunOS, where current directory is not lookup when doing dlopen
parent fca93011
No related branches found
No related tags found
No related merge requests found
......@@ -516,6 +516,7 @@ IF(KWSYS_C_SRCS OR KWSYS_CXX_SRCS)
# If kwsys contains the DynamicLoader, need extra library
IF(KWSYS_USE_DynamicLoader)
ADD_LIBRARY(testDynload MODULE testDynload.c)
GET_TARGET_PROPERTY(TEST_DYNLOAD_LOCATION testDynload LOCATION)
IF(UNIX)
TARGET_LINK_LIBRARIES(${KWSYS_NAMESPACE} ${CMAKE_DL_LIBS})
ENDIF(UNIX)
......
......@@ -86,7 +86,7 @@ int main(int , char *[])
res += TestDynamicLoader("libdl.so", "TestDynamicLoader",1,0,1);
#endif
// Now try on the generated library
kwsys_stl::string libname = GetLibName("testDynload");
kwsys_stl::string libname = TEST_DYNLOAD_LOCATION; //GetLibName("testDynload");
res += TestDynamicLoader(libname.c_str(), "dummy",1,0,1);
res += TestDynamicLoader(libname.c_str(), "TestDynamicLoaderFunction",1,1,1);
res += TestDynamicLoader(libname.c_str(), "_TestDynamicLoaderFunction",1,0,1);
......
......@@ -14,6 +14,8 @@
#ifndef @KWSYS_NAMESPACE@_testSystemtools_h
#define @KWSYS_NAMESPACE@_testSystemtools_h
#define TEST_DYNLOAD_LOCATION "@TEST_DYNLOAD_LOCATION@"
#define TEST_SYSTEMTOOLS_BIN_FILE "@TEST_SYSTEMTOOLS_BIN_FILE@"
#define TEST_SYSTEMTOOLS_SRC_FILE "@TEST_SYSTEMTOOLS_SRC_FILE@"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment