Modernize retained Linux WebGL CMake baselines
This commit is contained in:
@@ -17,8 +17,8 @@ Keep it updated as platform paths move to shared CMake targets.
|
||||
| Android standard | `android/android/build.gradle`, `android/android/CMakeLists.txt` | Retained native library target `native-lib`; CMake 3.10/C++23 baseline now links the standard arm64 package path with modern component/service sources and the generated `nanort` overlay helper |
|
||||
| Android Quest | `android/quest/build.gradle`, `android/quest/CMakeLists.txt` | OVR SDK imported libraries; CMake 3.10/C++23 baseline and current Yoga source list configure with the shared Android package compatibility helper |
|
||||
| Android Focus/Wave | `android/focus/build.gradle`, `android/focus/CMakeLists.txt` | Wave SDK imported libraries; CMake 3.10/C++23 baseline and current Yoga source list configure with the shared Android package compatibility helper |
|
||||
| Linux | `linux/CMakeLists.txt` | Old CMake 3.4, C++14 flag |
|
||||
| WebGL/Emscripten | `webgl/CMakeLists.txt` | Old CMake 3.4, WebGL2 flags |
|
||||
| Linux | `linux/CMakeLists.txt` | Retained app target now uses CMake 3.10 and target-level C++23 while package/root target migration remains open |
|
||||
| WebGL/Emscripten | `webgl/CMakeLists.txt` | Retained WebGL app target now uses CMake 3.10 and target-level C++23 with retained WebGL2/Emscripten link flags |
|
||||
|
||||
## Existing Version Generation
|
||||
|
||||
@@ -211,6 +211,11 @@ powershell -ExecutionPolicy Bypass -File scripts\automation\apple-remote-build.p
|
||||
`panopainter_platform_build_apple_remote`. These targets call the existing
|
||||
platform automation scripts from CMake and keep platform validation discoverable
|
||||
from the CMake target graph while app/package target migration remains open.
|
||||
- Retained Linux and WebGL app CMake entrypoints are still separate from root
|
||||
CMake, but now share the modernization baseline of CMake 3.10 and
|
||||
target-level `cxx_std_23`. `panopainter_retained_platform_cmake_self_test`
|
||||
guards those baselines until these entrypoints are replaced by shared root
|
||||
CMake package/app targets.
|
||||
- Root CMake exposes named `fuzz` and `stress` CTest presets. `fuzz` currently
|
||||
runs deterministic parser/serializer edge tests for binary streams, image
|
||||
metadata, PPI, stroke scripts, and layout XML; `stress` currently runs the
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1412,6 +1412,11 @@ checks: `panopainter_package_readiness`,
|
||||
`panopainter_android_native_package_smoke`. App/package entrypoints still need
|
||||
to consume shared targets and remain covered by debt until package validation
|
||||
is migrated from legacy package projects to root CMake.
|
||||
Retained Linux and WebGL app CMake entrypoints now match the interim platform
|
||||
baseline used by Android package paths: CMake 3.10 plus target-level
|
||||
`cxx_std_23`, with `panopainter_retained_platform_cmake_self_test` guarding
|
||||
against regressions while those entrypoints wait behind root CMake package/app
|
||||
target migration.
|
||||
Apple compile validation now runs on the local Mac mini SSH host
|
||||
`panopainter-mac` through `scripts/automation/apple-remote-build.ps1`. The host
|
||||
uses Homebrew CMake/Ninja/Git plus full Xcode via `DEVELOPER_DIR`, pulls the
|
||||
@@ -2413,6 +2418,11 @@ Results:
|
||||
panopainter_windows_app_package_smoke`, which builds the CMake `PanoPainter`
|
||||
app target, validates the executable/runtime `data/` copy, and reports the
|
||||
still-blocked Windows AppX package state.
|
||||
- Retained Linux and WebGL app CMake files now use CMake 3.10 and target-level
|
||||
C++23 instead of global C++14 flags; `python
|
||||
scripts/dev/check_retained_platform_cmake.py` and CTest
|
||||
`panopainter_retained_platform_cmake_self_test` guard those baselines while
|
||||
the actual Linux/WebGL app/package targets remain outside root CMake.
|
||||
- Root CMake now exposes platform validation targets for the default headless
|
||||
platform-build sweep, the Android standard/Quest/Focus root CMake asset
|
||||
component sweep, the vcpkg-backed UI core dependency boundary, and the
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.4.1)
|
||||
project(panopainter)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
project(PanoPainterLinux LANGUAGES C CXX)
|
||||
|
||||
add_executable(panopainter
|
||||
src/main.cpp
|
||||
@@ -120,4 +118,7 @@ target_include_directories(panopainter PRIVATE
|
||||
)
|
||||
|
||||
target_link_libraries(panopainter glfw curl GL dl X11 pthread)
|
||||
target_compile_features(panopainter PRIVATE cxx_std_23)
|
||||
set_target_properties(panopainter PROPERTIES
|
||||
CXX_EXTENSIONS OFF)
|
||||
target_compile_definitions(panopainter PUBLIC "$<$<CONFIG:DEBUG>:_DEBUG>")
|
||||
|
||||
61
scripts/dev/check_retained_platform_cmake.py
Normal file
61
scripts/dev/check_retained_platform_cmake.py
Normal file
@@ -0,0 +1,61 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Guard retained non-root platform CMake files during Phase 6 migration."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import re
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
RETAINED_PLATFORM_CMAKE = [
|
||||
Path("linux/CMakeLists.txt"),
|
||||
Path("webgl/CMakeLists.txt"),
|
||||
]
|
||||
|
||||
|
||||
def repo_root() -> Path:
|
||||
return Path(__file__).resolve().parents[2]
|
||||
|
||||
|
||||
def cmake_minimum_version(text: str) -> tuple[int, ...] | None:
|
||||
match = re.search(r"cmake_minimum_required\s*\(\s*VERSION\s+([0-9.]+)", text, re.I)
|
||||
if not match:
|
||||
return None
|
||||
return tuple(int(part) for part in match.group(1).split("."))
|
||||
|
||||
|
||||
def main() -> int:
|
||||
root = repo_root()
|
||||
results: dict[str, object] = {}
|
||||
ok = True
|
||||
|
||||
for path in RETAINED_PLATFORM_CMAKE:
|
||||
text = (root / path).read_text(encoding="utf-8")
|
||||
minimum_version = cmake_minimum_version(text)
|
||||
has_target_cxx23 = "target_compile_features(panopainter PRIVATE cxx_std_23)" in text
|
||||
has_cxx_extensions_off = "CXX_EXTENSIONS OFF" in text
|
||||
uses_global_cxx_standard_flag = bool(re.search(r"-std=c\+\+14|-std=c\+\+17|-std=c\+\+20", text))
|
||||
platform_ok = (
|
||||
minimum_version is not None
|
||||
and minimum_version >= (3, 10)
|
||||
and has_target_cxx23
|
||||
and has_cxx_extensions_off
|
||||
and not uses_global_cxx_standard_flag
|
||||
)
|
||||
ok = ok and platform_ok
|
||||
results[str(path)] = {
|
||||
"ok": platform_ok,
|
||||
"minimumVersion": ".".join(str(part) for part in minimum_version) if minimum_version else None,
|
||||
"hasTargetCxx23": has_target_cxx23,
|
||||
"hasCxxExtensionsOff": has_cxx_extensions_off,
|
||||
"usesGlobalCxxStandardFlag": uses_global_cxx_standard_flag,
|
||||
}
|
||||
|
||||
print(json.dumps({"ok": ok, "platforms": results}, separators=(",", ":")))
|
||||
return 0 if ok else 1
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
||||
@@ -15,6 +15,11 @@ add_test(NAME panopainter_package_smoke_readiness_self_test
|
||||
set_tests_properties(panopainter_package_smoke_readiness_self_test PROPERTIES
|
||||
LABELS "tooling;desktop-fast")
|
||||
|
||||
add_test(NAME panopainter_retained_platform_cmake_self_test
|
||||
COMMAND "${Python3_EXECUTABLE}" "${PROJECT_SOURCE_DIR}/scripts/dev/check_retained_platform_cmake.py")
|
||||
set_tests_properties(panopainter_retained_platform_cmake_self_test PROPERTIES
|
||||
LABELS "tooling;desktop-fast")
|
||||
|
||||
add_library(pp_test_harness INTERFACE)
|
||||
target_include_directories(pp_test_harness INTERFACE
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.4.1)
|
||||
project(panopainter)
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
project(PanoPainterWebGL LANGUAGES C CXX)
|
||||
file(COPY ../data
|
||||
DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
|
||||
add_executable(panopainter
|
||||
@@ -103,8 +103,10 @@ add_executable(panopainter
|
||||
../src/node_shorcuts.cpp
|
||||
../src/node_metadata.cpp
|
||||
)
|
||||
target_compile_options(panopainter PRIVATE -std=c++14 -O3)
|
||||
target_compile_options(panopainter PRIVATE -O3)
|
||||
target_compile_features(panopainter PRIVATE cxx_std_23)
|
||||
set_target_properties(panopainter PROPERTIES
|
||||
CXX_EXTENSIONS OFF
|
||||
SUFFIX ".html"
|
||||
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/html"
|
||||
LINK_FLAGS "\
|
||||
|
||||
Reference in New Issue
Block a user