Skip to content

[cmake] Use ExternalProject to generate GTest sub-build config#1053

Merged
aaronj0 merged 1 commit into
compiler-research:mainfrom
aaronj0:gtest-generator-config
Jul 7, 2026
Merged

[cmake] Use ExternalProject to generate GTest sub-build config#1053
aaronj0 merged 1 commit into
compiler-research:mainfrom
aaronj0:gtest-generator-config

Conversation

@aaronj0

@aaronj0 aaronj0 commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Use declarative CMAKE_ARGS: ExternalProject generates the configure command itself and forwards the parent generator, platform and toolset. Fixes the case where a parent configured with -A Win32 -Thost=x64 spawned sub-builds on the VS generator's default x64 platform, which tries to link x64 objects against the forwarded /machine:X86 linker flags and fail.

Required by #1051

Use declarative CMAKE_ARGS: ExternalProject generates the configure
command itself and forwards the parent generator, platform, toolset
and instance. Fixes the case where a parent configured with -A Win32
-Thost=x64 spawned sub-builds on the VS generator's default x64
platform, which tries to link x64 objects against the forwarded
/machine:X86 linker flags and fail.
@aaronj0 aaronj0 requested a review from vgvassilev July 7, 2026 12:35
@codecov

codecov Bot commented Jul 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.62%. Comparing base (91a0c1e) to head (2bb3b80).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1053   +/-   ##
=======================================
  Coverage   86.62%   86.62%           
=======================================
  Files          23       23           
  Lines        5946     5946           
=======================================
  Hits         5151     5151           
  Misses        795      795           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@vgvassilev vgvassilev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Lgtm!

@aaronj0 aaronj0 merged commit 794f495 into compiler-research:main Jul 7, 2026
26 of 27 checks passed
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.

2 participants