diff options
| author | Bent Bisballe Nyeng <deva@aasimon.org> | 2025-12-28 21:48:09 +0100 |
|---|---|---|
| committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2026-01-02 13:20:17 +0100 |
| commit | fe9183b22f09254a756cb47d6897b1475ad811b1 (patch) | |
| tree | 18fe5c6f16e97bfbf952cdbbcfb12a8f0b410042 /test/suite/test.cc | |
| parent | e4f612979e9361e006f049ff445e9c78497adbbd (diff) | |
WIPmsvc
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); |
