os_libpath.h
Go to the documentation of this file.
1 #ifndef cetlib_os_libpath_h
2 #define cetlib_os_libpath_h
3 
4 namespace cet {
5  // Return the name of the environment variable that defines the
6  // search path for the dynamic library loader on this operating
7  // system.
8  constexpr char const* os_libpath();
9 }
10 
11 inline constexpr char const*
13 {
14 #if __linux__
15  return "LD_LIBRARY_PATH";
16 #elif __APPLE__ && __MACH__
17  return "DYLD_LIBRARY_PATH";
18 #else
19 #error Unknown operating system
20 #endif
21 }
22 
23 #endif /* cetlib_os_libpath_h */
24 
25 // Local Variables:
26 // mode: c++
27 // End:
constexpr char const * os_libpath()
Definition: os_libpath.h:12