1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
#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
|