Skip to content
Snippets Groups Projects
Commit d94f92f7 authored by Chuck Atkins's avatar Chuck Atkins Committed by Brad King
Browse files

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
No related branches found
No related tags found
No related merge requests found
...@@ -429,6 +429,17 @@ SET_SOURCE_FILES_PROPERTIES(ProcessUNIX.c System.c PROPERTIES ...@@ -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}" 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) IF(KWSYS_USE_SystemTools)
KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_HAS_SETENV KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_HAS_SETENV
"Checking whether CXX compiler has setenv" DIRECT) "Checking whether CXX compiler has setenv" DIRECT)
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#endif #endif
// This file actually contains several different implementations: // 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 // * HP machines which uses shl_load
// * Mac OS X 10.2.x and earlier which uses NSLinkModule // * Mac OS X 10.2.x and earlier which uses NSLinkModule
// * Windows which uses LoadLibrary // * Windows which uses LoadLibrary
...@@ -25,13 +25,9 @@ ...@@ -25,13 +25,9 @@
// Each part of the ifdef contains a complete implementation for // Each part of the ifdef contains a complete implementation for
// the static methods of DynamicLoader. // the static methods of DynamicLoader.
#if defined(__gnu_blrts__) || defined(__LIBCATAMOUNT__) || \ #if !KWSYS_SUPPORTS_SHARED_LIBS
defined(__CRAYXT_COMPUTE_LINUX_TARGET)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// Implementation for systems without dynamic libs (BG/L and Cray) // Implementation for environments without dynamic libs
// __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
#include <string.h> // for strerror() #include <string.h> // for strerror()
namespace KWSYS_NAMESPACE { namespace KWSYS_NAMESPACE {
......
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