Windows: qualify Configuration, Crypto and System
- Allowlist Configuration, Crypto and System for the Windows target. - System: link winmm for the Win32 audio backend; include windows.h before mmsystem.h. - Tests: add a whole-file // @requires-posix gate (CMake path and the VBS build.cpp) and mark the POSIX-only System suites; skip helper-based cases on Windows; make setenv/unsetenv and getpid portable. - The POSIX process helper is no longer built on Windows. Cross-built with x86_64-w64-mingw32 GCC 16.2: all modules and VoidTests.exe link. Linux System+Testing suite still passes (477 tests, 474 passed). Refs #65
This commit is contained in:
1 parent
c085822686
commit
bd5488b15b
16 files changed
+196
-31
No files matched your search
+14
-1
@@ -26,6 +26,17 @@ function(_void_test_requires_satisfied src_file active_modules active_headers ou
|
||||
return()
|
||||
endif()
|
||||
endif()
|
||||
# Whole-file POSIX gate: files that only exercise POSIX APIs (openat,
|
||||
# fork/wait, process groups, /proc, ...) cannot be compiled for Windows.
|
||||
if(WIN32)
|
||||
string(FIND "${_src_content}" "// @requires-posix" _needs_posix)
|
||||
if(NOT _needs_posix EQUAL -1)
|
||||
message(STATUS
|
||||
"[VoidTests] Skipping ${src_file} (requires POSIX)")
|
||||
set(${out_var} FALSE PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
endif()
|
||||
string(REGEX MATCHALL "#[ \t]*include[ \t]*[<\"](Void/[^/\">]+/[^>\"]+)[>\"]"
|
||||
_matches "${_src_content}")
|
||||
set(_ok TRUE)
|
||||
@@ -209,7 +220,9 @@ endif()
|
||||
# ── Test-support executables & libraries ──────────────────────────────────────
|
||||
# These are NOT test files; they are helper executables/libs referenced by tests.
|
||||
|
||||
if(TARGET VoidTests AND (TARGET Void::System OR TARGET Void::IPC))
|
||||
# The process helper is POSIX-only (poll.h, fork/wait); Windows tests that
|
||||
# need it are guarded or not built.
|
||||
if(TARGET VoidTests AND (TARGET Void::System OR TARGET Void::IPC) AND NOT WIN32)
|
||||
add_executable(VoidProcessHelper
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/helpers/ProcessHelper.cpp")
|
||||
set_target_properties(VoidProcessHelper PROPERTIES
|
||||
|
||||
Reference in new issue
Block a user