VAPOR3
3.9.4
include
vapor
SetHDF5PluginPath.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <stdlib.h>
4
#include "
vapor/MyBase.h
"
5
#include "
vapor/ResourcePath.h
"
6
7
namespace
VAPoR
{
8
void
SetHDF5PluginPath
() {
9
char
*existing = getenv(
"HDF5_PLUGIN_PATH"
);
10
if
(existing) {
11
printf(
"Using custom HDF5_PLUGIN_PATH: '%s'\n"
, existing);
12
return
;
13
}
14
15
int
rc=0;
16
std::string plugins =
"HDF5_PLUGIN_PATH="
+
Wasp::GetSharePath
(
"plugins"
);
17
#ifdef WIN32
18
rc=_putenv(plugins.c_str());
19
#else
20
rc = setenv(
"HDF5_PLUGIN_PATH"
,
Wasp::GetSharePath
(
"plugins"
).c_str(), 1);
21
#endif
22
23
if
(rc != 0)
Wasp::MyBase::SetErrMsg
(
"Unable to set environtment variable s"
, plugins.c_str());
24
}
25
};
// namespace VAPoR
MyBase.h
ResourcePath.h
Wasp::MyBase::SetErrMsg
static void SetErrMsg(const char *format,...)
Record a formatted error message.
VAPoR
Definition:
AnnotationParams.h:33
VAPoR::SetHDF5PluginPath
void SetHDF5PluginPath()
Definition:
SetHDF5PluginPath.h:8
Wasp::GetSharePath
COMMON_API std::string GetSharePath(const std::string &name)
Generated by
1.9.6