Skip to content

Commit

Permalink
fix windows full build (#728)
Browse files Browse the repository at this point in the history
* test

* revert .yml
  • Loading branch information
a-zakir authored Dec 12, 2023
1 parent e5ffb74 commit 51cb0ad
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/cpp/multisolver_interface/environment.cc
Original file line number Diff line number Diff line change
Expand Up @@ -223,14 +223,13 @@ std::string GetXpressVarFromEnvironmentVariables(const char* XPRESS_var) {
if (requiredSize == 0) {
std::cerr << "[Windows getenv_s function]: " << XPRESS_var
<< " doesn't exist!\n";
}

xpress_home_from_env.resize(requiredSize);

// Get the value of the LIB environment variable.
getenv_s(&requiredSize, xpress_home_from_env.data(), requiredSize,
XPRESS_var);
} else {
xpress_home_from_env.resize(requiredSize);

// Get the value of the LIB environment variable.
getenv_s(&requiredSize, xpress_home_from_env.data(), requiredSize,
XPRESS_var);
}
#else
char* path = nullptr;
path = getenv(XPRESS_var);
Expand Down

0 comments on commit 51cb0ad

Please sign in to comment.