MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / SetEnvVar

Function SetEnvVar

test/cpp/utils/flags_native_test.cc:77–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75#if defined(_POSIX_C_SOURCE) && \
76 _POSIX_C_SOURCE >= 200112L // environment for use setenv
77bool SetEnvVar(const std::string& var_name, const std::string& var_value) {
78 int res = setenv(var_name.c_str(), var_value.c_str(), 1);
79 return res == 0;
80}
81
82PD_DEFINE_bool(paddle_test_env_bool, false, "test env bool flag");
83PD_DEFINE_double(paddle_test_env_double, 3.14, "test env double flag");

Callers 1

TESTFunction · 0.85

Calls 1

c_strMethod · 0.80

Tested by

no test coverage detected