BUG: Trying to get testDynamicLoader to work on Solaris and SunOS, where current directory is not lookup when doing dlopen
This commit is contained in:
parent
89e5fc63fe
commit
c0161e9e57
|
@ -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@"
|
||||
|
||||
|
|
Loading…
Reference in New Issue