Commit d94f92f7 authored by Chuck Atkins's avatar Chuck Atkins Committed by Brad King

DynamicLoader: Expand noop implementation to more platforms

Rather than just testing for explicit platforms in the dynamic loader,
i.e. old BlueGene and Cray systems, leverage CMake's platform knowlege
to determine if shared libraries are supported.

Change-Id: I6189bcfb6d528cf4c96a40be2b31af981d09dbb2
parent f1afce25
......@@ -429,6 +429,17 @@ SET_SOURCE_FILES_PROPERTIES(ProcessUNIX.c System.c PROPERTIES
COMPILE_FLAGS "-DKWSYS_C_HAS_PTRDIFF_T=${KWSYS_C_HAS_PTRDIFF_T} -DKWSYS_C_HAS_SSIZE_T=${KWSYS_C_HAS_SSIZE_T}"
)
IF(KWSYS_USE_DynamicLoader)
GET_PROPERTY(KWSYS_SUPPORTS_SHARED_LIBS GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS)
IF(KWSYS_SUPPORTS_SHARED_LIBS)
SET(KWSYS_SUPPORTS_SHARED_LIBS 1)
ELSE()
SET(KWSYS_SUPPORTS_SHARED_LIBS 0)
ENDIF()
SET_PROPERTY(SOURCE DynamicLoader.cxx APPEND PROPERTY COMPILE_DEFINITIONS
KWSYS_SUPPORTS_SHARED_LIBS=${KWSYS_SUPPORTS_SHARED_LIBS})
ENDIF()
IF(KWSYS_USE_SystemTools)
KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_HAS_SETENV
"Checking whether CXX compiler has setenv" DIRECT)
......
......@@ -13,7 +13,7 @@
#endif
// This file actually contains several different implementations:
// * NOOP for systems without dynamic libs (BG/L and Cray)
// * NOOP for environments without dynamic libs
// * HP machines which uses shl_load
// * Mac OS X 10.2.x and earlier which uses NSLinkModule
// * Windows which uses LoadLibrary
......@@ -25,13 +25,9 @@
// Each part of the ifdef contains a complete implementation for
// the static methods of DynamicLoader.
#if defined(__gnu_blrts__) || defined(__LIBCATAMOUNT__) || \
defined(__CRAYXT_COMPUTE_LINUX_TARGET)
#if !KWSYS_SUPPORTS_SHARED_LIBS
//----------------------------------------------------------------------------
// Implementation for systems without dynamic libs (BG/L and Cray)
// __gnu_blrts__ is IBM BlueGene/L
// __LIBCATAMOUNT__ is defined on Catamount on older Cray compute nodes
// __CRAYXT_COMPUTE_LINUX_TARGET is defined on newer Cray compute nodes
// Implementation for environments without dynamic libs
#include <string.h> // for strerror()
namespace KWSYS_NAMESPACE {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment