Skip to content

build: link stdc++exp through a generator expression - #7

Merged
codethinki merged 1 commit into
masterfrom
fix/package-stdcxxexp
Oct 4, 2026
Merged

codethinki merged 1 commit into
masterfrom
fix/package-stdcxxexp

Conversation

@codethinki

Copy link
Copy Markdown
Owner

The if() around target_link_libraries(cth INTERFACE stdc++exp) was evaluated when the package was built. A package built with gcc exported INTERFACE_LINK_LIBRARIES "stdc++exp", so msvc consumers of the same package would try to link stdc++exp.lib.

Now the condition is a generator expression, exported as is and evaluated by the consumer, like /Zc:preprocessor already was. Needed to ship one finished package (e.g. in letter_boxed_solver/lib/cth) for every platform.

The if() was evaluated when building the package, so a package built with
gcc made every consumer link stdc++exp, msvc included. The generator
expression is exported and evaluated by the consumer.
@codethinki
codethinki merged commit 45aaf02 into master Oct 4, 2026
6 checks passed
@codethinki
codethinki deleted the fix/package-stdcxxexp branch October 5, 2026 00:38
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