Skip to content

Improve behavior on multi-config generators - #1384

Merged
Daan (daanx) merged 2 commits into
microsoft:dev3from
res2k:dev3-multi-config
Sep 12, 2026
Merged

Improve behavior on multi-config generators#1384
Daan (daanx) merged 2 commits into
microsoft:dev3from
res2k:dev3-multi-config

Conversation

@res2k

Copy link
Copy Markdown
Contributor

The current CMakeLists.txt is generally assumes CMAKE_BUILD_TYPE is set at configure time, however, on multi-config generators (such as Visual Studio generators), this is typically not the case. Instead, the configuration can be changed at build time, and anything configuration-dependent needs to utilize generator expressions. (Thankfully, generator expressions using the configuration will also work fine for single-configuration generators.)

These changes try to replace use of CMAKE_BUILD_TYPE with generator expressions where sensible. In the case of the MI_DEBUG option, the default case will choose different flags depending on whether Release or Debug configurations are build.
If some non-default MI_DEBUG was chosen it will have precedence.

I made this PR against dev3 mainly to simplify things for me. If these changes are deemed desirable, I can look into porting them to the other dev branches later.

@res2k
Frank Richter (res2k) marked this pull request as ready for review August 30, 2026 17:46
@daanx
Daan (daanx) merged commit d43d7c6 into microsoft:dev3 Sep 12, 2026
1 check passed
@daanx

Copy link
Copy Markdown
Collaborator

Thanks Frank!

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