From f2eb782080a74a7d789dea154e17e18cf5121af4 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sun, 28 Dec 2025 21:48:09 +0100 Subject: WIP --- test/suite/test.cc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'test/suite/test.cc') diff --git a/test/suite/test.cc b/test/suite/test.cc index b096a8b..3c7ce4a 100644 --- a/test/suite/test.cc +++ b/test/suite/test.cc @@ -21,8 +21,13 @@ int fail(int value = 1, exit(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 run_ctor(const std::vector& args, const std::source_location location = std::source_location::current()) @@ -128,18 +133,28 @@ 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_exe); ////////////////////////////////////////////////////////////////////////////// // bootstrap + // TODO: add support for quoted strings with spaces { auto cxx_prog = locate(CXX, paths); std::vector 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 if(!CXXFLAGS.empty()) { auto tokens = argsplit(CXXFLAGS); @@ -168,8 +183,11 @@ int main() ////////////////////////////////////////////////////////////////////////////// // check if source file changes are tracked { +#if _MSC_VER && !__INTEL_COMPILER +#else // No build files should have been created yet assert_not_exists(BUILDDIR); +#endif // capture ctor binary before configure is called Tracker ctor_bin(ctor_exe); -- cgit v1.2.3