ppovb5fc7/sdformat/test/test_config.h.in

27 lines
623 B
C
Raw Permalink Normal View History

2019-03-25 11:01:43 +08:00
#define PROJECT_SOURCE_PATH "${PROJECT_SOURCE_DIR}"
#define PROJECT_BINARY_DIR "${CMAKE_BINARY_DIR}"
#define SDF_PROTOCOL_VERSION "${SDF_PROTOCOL_VERSION}"
/*
* setenv/unstenv are not present in Windows. Define them to make the code
* portable
*/
#if (_MSC_VER >= 1400) // Visual Studio 2005
#include <sstream>
int setenv(const char * name, const char * value, int /*rewrite*/)
{
std::stringstream sstr;
sstr << *name << '=' << value;
return _putenv(sstr.str().c_str());
}
void unsetenv(const char * name)
{
std::stringstream sstr;
sstr << *name << '=';
_putenv(sstr.str().c_str());
return;
}
#endif