Skip to content

CMake: integrate GoogleTest with CTest - #64

Open
pmeems wants to merge 4 commits into
cmake-phase-2-activexfrom
cmake-phase-3-gtest-ctest
Open

pmeems wants to merge 4 commits into
cmake-phase-2-activexfrom
cmake-phase-3-gtest-ctest

Conversation

@pmeems

@pmeems pmeems commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds MapWinGIS.Core.Tests to the CMake build with the existing GoogleTest sources, shared ActiveX sources, renderer test hooks, MIDL interface, and runtime dependencies. CTest discovers individual cases before test execution, writes per-test XML, and includes a labeled interactive activation check. The activation script accepts an optional -BinDirectory; its existing MSBuild default is unchanged. CMake testing and reporting are documented.

This layer is based on PR #41 (cmake-phase-2-activex).

Validation

  • Ninja x64 Debug and Visual Studio 18 x64 Debug builds pass. CTest under both generators and the MSBuild test executable each ran 173 tests: 170 passed, 3 skipped.
  • MSBuild Debug|x64 solution build: 0 warnings.
  • Debug x64 parity: 0 unexplained lost flags. The 22 ActiveX intermediate-directory differences map to the generated MIDL include directory. Dumpbin summaries for Core.dll, the OCX, and the test executable match. CMake warning count: 0; the parity Rebuild reported two transient MSB3061 delete warnings for json-c.dll and jpeg62.dll.
  • The CMake build does not yet include the Translate sample TU/link (Phase 4). The interactive per-user COM activation test and CLion UI discovery/debug workflow were not verified here.

pmeems and others added 2 commits November 12, 2026 10:57
- Add the native test target with shared ActiveX sources and test hooks.
- Register per-test discovery, runtime dependencies, and XML reports with CTest.
- Document CMake test workflows and preserve the MSBuild activation path.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Classify the MSBuild ActiveX intermediate path replaced by CMake MIDL output.
- Keep the test-target parity report focused on unexplained flag differences.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@pmeems
pmeems added this pull request to stack #42 November 12, 2026 10:03

@pmeems pmeems left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review. Final decision is with the human reviewer.

Reviewed the CMake/CTest test integration against AGENTS.md and docs/ (BUILDING, TESTING, CMAKE-MIGRATION, CODING-STANDARDS). Verified source parity between the new tests/MapWinGIS.Core.Tests/CMakeLists.txt and the MSBuild .vcxproj (identical 17 TUs + TestData.h, MWG_ENABLE_RENDERER_TEST_HOOKS on both), the vcpkg tests feature wiring for MWG_BUILD_TESTS, and the extra_skill_dirs-style propagation of MWG_ACTIVEX_SHARED_SOURCES via PARENT_SCOPE. CI (x64 Debug) passes. One behavioral claim was verified empirically with a local CMake 4.4.2 + Ninja repro (see the Major comment on tests/MapWinGIS.Core.Tests/CMakeLists.txt). Non-blocking note: the PR title repeats the epic title rather than this phase's scope (GoogleTest/CTest integration); consider retitling for the merge log.

Comment thread docs/BUILDING.md Resolved
Comment thread docs/TESTING.md Resolved
@pmeems pmeems changed the title CMake Introduce CMake as the Primary Build System for MapWinGIS6 CMake: integrate GoogleTest with CTest Nov 12, 2026
pmeems and others added 2 commits November 12, 2026 15:35
- Omit the redundant configuration argument for activation tests.

- Rely on preset filtering and align the compile-difference table.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Integrate the latest CMake phase 2 base.

- Keep CMake test sources and activation helper aligned with the split test projects.

- Preserve the CTest preset behavior and review fixes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant