diff options
author | Chris Wilson <chris+github@qwirx.com> | 2016-09-03 00:25:52 +0100 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2016-09-09 20:54:12 +0100 |
commit | 98a6ad72ee819774a398440055abd87bc44e9ba0 (patch) | |
tree | 55a5c7eff8deaab2ab7d44ed0357576aa0687a96 /lib/common/Test.h | |
parent | 11a8c444875d8b7912fa07bdc3854e3adb27aa4e (diff) |
Fix Unix compilation using CMake.
Add platform detection that's compatible with the old buildsystem and its m4
autoconfigury.
Make Travis build and test using CMake as a separate target.
Remove unused function BoxGetTemporaryDirectoryName() to fixes compile using
CMake on Unix.
Diffstat (limited to 'lib/common/Test.h')
-rw-r--r-- | lib/common/Test.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/common/Test.h b/lib/common/Test.h index 36cd6a59..4b5cef61 100644 --- a/lib/common/Test.h +++ b/lib/common/Test.h @@ -243,12 +243,14 @@ void safe_sleep(int seconds); std::auto_ptr<Configuration> load_config_file(const std::string& config_file, const ConfigurationVerify& verify); -#ifdef _MSC_VER - // Our CMakeFiles compile tests to different executable filenames, - // e.g. test_common.exe instead of _test.exe. - #define TEST_EXECUTABLE BOX_MODULE ".exe" -#else - #define TEST_EXECUTABLE "./_test" -#endif +#ifndef TEST_EXECUTABLE +# ifdef _MSC_VER + // Our CMakeFiles compile tests to different executable filenames, + // e.g. test_common.exe instead of _test.exe. + #define TEST_EXECUTABLE BOX_MODULE ".exe" +# else + #define TEST_EXECUTABLE "./_test" +# endif +#endif // TEST_EXECUTABLE #endif // TEST__H |