diff options
Diffstat (limited to 'test/suite/test.cc')
| -rw-r--r-- | test/suite/test.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/suite/test.cc b/test/suite/test.cc index 0ab1299..faa72b3 100644 --- a/test/suite/test.cc +++ b/test/suite/test.cc @@ -33,8 +33,13 @@ int fail(int value = 1, return value; } +#if _MSC_VER && !__INTEL_COMPILER +const std::string ctor_exe{"ctor.exe"}; +const std::string obj_ext{".obj"}; +#else const std::string ctor_exe{"./ctor"}; const std::string obj_ext{".o"}; +#endif void copy_config(std::string cfg) { @@ -69,6 +74,9 @@ int main() // Wipe the board std::filesystem::remove_all(BUILDDIR); +#if _MSC_VER && !__INTEL_COMPILER + std::filesystem::create_directory(BUILDDIR); +#endif std::filesystem::remove("configuration.cc"); std::filesystem::remove("config.h"); std::filesystem::remove("ctor"); @@ -78,8 +86,14 @@ int main() // Compile bootstrap binary std::vector<std::string> args = +#if _MSC_VER && !__INTEL_COMPILER + {"/nologo", "/MT", "/std:c++20", "/D_X86_", "/EHsc", "/I..\\..\\src", + "ctor.cc", "/link", "/LIBPATH:"+CTORDIR, "libctor.lib", + "/subsystem:console", "/out:" + ctor_exe}; +#else {"-pthread", "-std=c++20", "-L", CTORDIR, "-lctor", "-I", "../../src", "ctor.cc", "-o", ctor_exe}; +#endif // TODO: add support for quoted strings with spaces if(!CXXFLAGS.empty()) @@ -107,11 +121,14 @@ int main() ////////////////////////////////////////////////////////////////////////////// { +#if _MSC_VER && !__INTEL_COMPILER +#else // No build files should have been created yet if(std::filesystem::exists(BUILDDIR)) { return fail(); } +#endif // capture ctor binary before configure is called auto ctor_bin = readFile(ctor_exe); |
