summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorMathieu Malaterre <mathieu.malaterre@gmail.com>2006-03-10 19:53:42 (GMT)
committerMathieu Malaterre <mathieu.malaterre@gmail.com>2006-03-10 19:53:42 (GMT)
commitc0161e9e57321f283fc88812779d627fb722a40a (patch)
tree90e38c8412a44f18a2f46ecd4e1e5321b223cee4 /Source
parent89e5fc63fec560bec27d8517cc74ec41232736a0 (diff)
downloadCMake-c0161e9e57321f283fc88812779d627fb722a40a.zip
CMake-c0161e9e57321f283fc88812779d627fb722a40a.tar.gz
CMake-c0161e9e57321f283fc88812779d627fb722a40a.tar.bz2
BUG: Trying to get testDynamicLoader to work on Solaris and SunOS, where current directory is not lookup when doing dlopen
Diffstat (limited to 'Source')
-rw-r--r--Source/kwsys/CMakeLists.txt1
-rw-r--r--Source/kwsys/testDynamicLoader.cxx2
-rw-r--r--Source/kwsys/testSystemTools.h.in2
3 files changed, 4 insertions, 1 deletions
diff --git a/Source/kwsys/CMakeLists.txt b/Source/kwsys/CMakeLists.txt
index 6771d26..faae76f 100644
--- a/Source/kwsys/CMakeLists.txt
+++ b/Source/kwsys/CMakeLists.txt
@@ -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)
diff --git a/Source/kwsys/testDynamicLoader.cxx b/Source/kwsys/testDynamicLoader.cxx
index 9a2e307..1d2841a 100644
--- a/Source/kwsys/testDynamicLoader.cxx
+++ b/Source/kwsys/testDynamicLoader.cxx
@@ -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);
diff --git a/Source/kwsys/testSystemTools.h.in b/Source/kwsys/testSystemTools.h.in
index 5fefd10..cdccfbb 100644
--- a/Source/kwsys/testSystemTools.h.in
+++ b/Source/kwsys/testSystemTools.h.in
@@ -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@"