mirror of
https://github.com/taglib/taglib.git
synced 2025-07-19 13:34:19 -04:00
The following user-settable values for CMake are supported: - TESTS_DIR: Tests directory, is path to unit test data when 'data' is appended. Can be used to run the unit tests on a target. - TESTS_TMPDIR: Directory for temporary files created during unit tests, system tmpdir is used if undefined. Has to be defined on systems without global temporary directory.
This commit is contained in:
@ -54,12 +54,14 @@ inline string copyFile(const string &filename, const string &ext)
|
||||
{
|
||||
char testFileName[1024];
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifdef TESTS_TMPDIR
|
||||
snprintf(testFileName, sizeof(testFileName), "%s/taglib-test%s", TESTS_TMPDIR, ext.c_str());
|
||||
#elif defined _WIN32
|
||||
char tempDir[MAX_PATH + 1];
|
||||
GetTempPathA(sizeof(tempDir), tempDir);
|
||||
wsprintfA(testFileName, "%s\\taglib-test%s", tempDir, ext.c_str());
|
||||
#else
|
||||
snprintf(testFileName, sizeof(testFileName), "/%s/taglib-test%s", P_tmpdir, ext.c_str());
|
||||
snprintf(testFileName, sizeof(testFileName), "%s/taglib-test%s", P_tmpdir, ext.c_str());
|
||||
#endif
|
||||
|
||||
string sourceFileName = testFilePath(filename) + ext;
|
||||
|
Reference in New Issue
Block a user